Set the file root on HDFS where files (temp and final) can be written

@param fileRoot A valid HDFS location with space for the output of the data generation
@return An updated HDFSDistributor with hdfsFileRoot set
505891
public HDFSDistributor setFileRoot(String fileRoot) {
        this.hdfsFileRoot = fileRoot;
        this.mapperInputFilePath = new Path(hdfsFileRoot + "/input.dat");
        if (mapperOutputFileName != null) {
            this.mapperOutputFilePath = new Path(hdfsFileRoot + "/" + mapperOutputFileName);
        }
        return this;
    }
1155777
public static org.apache.hadoop.conf.Configuration getHadoopConfiguration() {
		Configuration retConf = new org.apache.hadoop.conf.Configuration();

		// We need to load both core-site.xml and hdfs-site.xml to determine the default fs path and
		// the hdfs configuration
		// Try to load HDFS configuration from Hadoop's own configuration files
		// 1. approach: Stratosphere configuration
		final String hdfsDefaultPath = GlobalConfiguration.getString(ConfigConstants.HDFS_DEFAULT_CONFIG, null);
		if (hdfsDefaultPath != null) {
			retConf.addResource(new org.apache.hadoop.fs.Path(hdfsDefaultPath));
		} else {
			LOG.debug("Cannot find hdfs-default configuration file");
		}

		final String hdfsSitePath = GlobalConfiguration.getString(ConfigConstants.HDFS_SITE_CONFIG, null);
		if (hdfsSitePath != null) {
			retConf.addResource(new org.apache.hadoop.fs.Path(hdfsSitePath));
		} else {
			LOG.debug("Cannot find hdfs-site configuration file");
		}
		
		// 2. Approach environment variables
		String[] possibleHadoopConfPaths = new String[4]; 
		possibleHadoopConfPaths[0] = GlobalConfiguration.getString(ConfigConstants.PATH_HADOOP_CONFIG, null);
		possibleHadoopConfPaths[1] = System.getenv("HADOOP_CONF_DIR");
		
		if (System.getenv("HADOOP_HOME") != null) {
			possibleHadoopConfPaths[2] = System.getenv("HADOOP_HOME")+"/conf";
			possibleHadoopConfPaths[3] = System.getenv("HADOOP_HOME")+"/etc/hadoop"; // hadoop 2.2
		}
		
		for (int i = 0; i < possibleHadoopConfPaths.length; i++) {
			if (possibleHadoopConfPaths[i] == null) {
				continue;
			}
			
			if (new File(possibleHadoopConfPaths[i]).exists()) {
				if (new File(possibleHadoopConfPaths[i]+"/core-site.xml").exists()) {
					retConf.addResource(new org.apache.hadoop.fs.Path(possibleHadoopConfPaths[i]+"/core-site.xml"));
					
					if (LOG.isDebugEnabled()) {
						LOG.debug("Adding "+possibleHadoopConfPaths[i]+"/core-site.xml to hadoop configuration");
					}
				}
				if (new File(possibleHadoopConfPaths[i]+"/hdfs-site.xml").exists()) {
					retConf.addResource(new org.apache.hadoop.fs.Path(possibleHadoopConfPaths[i]+"/hdfs-site.xml"));
					
					if (LOG.isDebugEnabled()) {
						LOG.debug("Adding "+possibleHadoopConfPaths[i]+"/hdfs-site.xml to hadoop configuration");
					}
				}
			}
		}
		return retConf;
	}
264857
async def root(self):
        
        if self.writing:
            await x.dump_uint(self.iobj, PortableStorageConsts.SIGNATUREA, 4)
            await x.dump_uint(self.iobj, PortableStorageConsts.SIGNATUREB, 4)
            await x.dump_uint(self.iobj, PortableStorageConsts.FORMAT_VER, 1)

        else:
            sig_a = await x.load_uint(self.iobj, 4)
            sig_b = await x.load_uint(self.iobj, 4)
            ver = await x.load_uint(self.iobj, 1)

            if sig_a != PortableStorageConsts.SIGNATUREA:
                raise ValueError('Signature A error')
            if sig_b != PortableStorageConsts.SIGNATUREB:
                raise ValueError('Signature A error')
            if ver != PortableStorageConsts.FORMAT_VER:
                raise ValueError('Unsupported version')
1031046
public BaseCondition getRoot() {
      BaseCondition p = this;
      while (p.getParent() != null) {
         p = p.getParent();
      }
      return p;
   }
798849
private CmsResource createSiteRootIfNeeded(String siteRoot) throws CmsException {

        CmsResource siteRootResource = null;

        // check if the site root already exists
        try {
            // take the existing site and do not perform any OU related actions
            if (m_cms.existsResource(siteRoot)) {
                siteRootResource = m_cms.readResource(siteRoot);
            } else {
                CmsResource onlineVersion = m_cmsOnline.readResource(siteRoot);
                siteRootResource = m_cms.readResource(onlineVersion.getStructureId());
            }

        } catch (CmsVfsResourceNotFoundException e) {
            // not create a new site folder and the according OU if option is checked checked
            getReport().println(
                Messages.get().container(Messages.RPT_SITE_CREATE_RESOURCES_0),
                I_CmsReport.FORMAT_DEFAULT);
            I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(
                CmsResourceTypeFolderSubSitemap.TYPE_SUBSITEMAP);
            siteRootResource = m_cms.createResource(siteRoot, type);
            CmsProperty folderTitle = new CmsProperty(
                CmsPropertyDefinition.PROPERTY_TITLE,
                m_site.getTitle(),
                m_site.getTitle());
            m_cms.writePropertyObject(siteRoot, folderTitle);

        }
        return siteRootResource;
    }
1098769
public PathImpl createRoot(SchemeMap schemeMap)
  {
    FilesystemPath restriction = (FilesystemPath) copy();

    restriction._schemeMap = schemeMap;
    restriction._root = this;
    restriction._pathname = "/";
    restriction._userPath = "/";

    return restriction;
  }
139238
func (s *DisablePolicyTypeOutput) SetRoot(v *Root) *DisablePolicyTypeOutput {
	s.Root = v
	return s
}
533822
public void initRoot(CmsObject cms, CmsResource root) {

        addTreeItem(cms, root, null);
        readTreeLevel(cms, root.getStructureId());
    }
1360960
public void setRoot( DbLevel v ) {
        DbLevel oldRoot = v;
        root = v;
        fireTreeStructureChanged(oldRoot);
    }
1354424
synchronized void setPrivateRoot(final Stoppable privateRoot) {
    if (privateRoot != null && this.privateRoot != null) {
      privateRoot.stop();
      throw new IllegalStateException("Private root already exists.");
    }

    this.privateRoot = privateRoot;
  }
863775
protected function createRootFolder()
    {
        $this->rootFolder = $this->createFolder($this->baseFolderRealPath, uniqid('xlsx', true));
        return $this;
    }
495630
func (s *EnablePolicyTypeOutput) SetRoot(v *Root) *EnablePolicyTypeOutput {
	s.Root = v
	return s
}
1134956
public Throwable getRootCause() {
		
		Throwable rootCause = null;
		Throwable nextCause = getCause();
		
		while (nextCause != null && !nextCause.equals(rootCause)) {
			rootCause = nextCause;
			nextCause = nextCause.getCause();
		}
		
		return rootCause;
	}
740081
public static FileStatus getRootFileStatus(Path rootPath) {
        return new FileStatus(0, true, 1, 1024, -1, -1, DIRECTORY_PERMISSION, null, null, rootPath);
    }
234552
public void setIncludeRoot(File includeroot) {

        this.includeroot = includeroot;

        if (!includeroot.exists()) {
            throw new BuildException("includeroot doesn't exist: "
                    + includeroot);
        }
        if (!includeroot.isDirectory()) {
            throw new BuildException("includeroot must be a directory: "
                    + includeroot);
        }
    }
760457
public void setRootLoggingLevel(final int loggingLevel) {
        rootLoggingLevel = loggingLevel;
        if (rootLoggerBack != null) {
            rootLoggerBack.setLevel(LoggingLevel.getLevelFromInt(loggingLevel));
        }
    }
1344708
public void setSiteRoot(String siteRoot) {

        // site roots must never end with a "/"
        if (siteRoot.endsWith("/")) {
            m_siteRoot = siteRoot.substring(0, siteRoot.length() - 1);
        } else {
            m_siteRoot = siteRoot;
        }
    }