public class HadoopConfiguration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.conf.Configuration |
conf |
Constructor and Description |
---|
HadoopConfiguration()
Class Constructor creates a new Configuration object.
|
HadoopConfiguration(java.util.Properties prop)
Class Constructor creates a new Configuration object and sets the related properties.
|
Modifier and Type | Method and Description |
---|---|
RasterJob |
createRasterJob()
Creates a raster job based on this configuration, if it was already created, no new job is created.
|
RasterJob |
createRasterLoaderJob()
Creates a raster loader job based on this configuration, if it was already created, no new job is created.
|
RasterJob |
createRasterProcessorJob()
Creates a raster processsing job based on this configuration, if it was already created, no new job is created.
|
org.apache.hadoop.conf.Configuration |
getConf()
Gets the hadoop configuration object
|
org.apache.hadoop.fs.FileSystem |
getFileSystem()
Gets the filesystem associated to this configuration
|
RasterJob |
getJob()
Gets the job related to this configuration
|
java.lang.String |
getProperty(java.lang.String key)
Gets the property for the related key on this configuration
|
org.apache.hadoop.fs.Path |
getYarnLogDir()
Gets the path for yarn logs
|
void |
printProperties()
Dumps the configuration to system console, for debugging.
|
void |
setBlockSize(int mb)
Sets the HDFS block size
|
void |
setGdalDataPath(java.lang.String gdalDataPath)
Sets GDAL_DATA environment variable to this configuration, location of this folder must be shared to all instances of the cluster.
|
void |
setHdfsPathPrefix(java.lang.String hdfsPathPrefix)
Sets the default HDFS path prefix for this configuration.
|
void |
setJobHistoryAddress(java.lang.String jobHistoryAddress)
Sets the job history server address for this configuration.
|
void |
setMapreduceJobJar(java.lang.String jobJar)
Sets the jar that contains mapreduce application to attach in this configuration.
|
void |
setProperty(java.lang.String key, java.lang.String value)
Sets a property to this configuration.
|
void |
setResourceManagerAddress(java.lang.String resourceManagerAddress)
Sets the address of the applications manager interface in the Resource Manager.
|
void |
setResourceManagerScheduler(java.lang.String resourceManagerScheduler)
Sets the Resource Manager scheduler interface for this configuration.
|
void |
setUser(java.lang.String user)
Sets the ugi user to execute jobs created from this configuration.
|
void |
setYarnApplicationClasspath(java.lang.String classpath)
Sets the yarn application classpath to be used in this job
|
public HadoopConfiguration(java.util.Properties prop) throws java.lang.Exception
prop
- properties containing the element to set in the configuration object.java.lang.Exception
- if there is a problem during configuration creationpublic HadoopConfiguration()
public java.lang.String getProperty(java.lang.String key)
key
- key value to search in this configurationpublic org.apache.hadoop.fs.Path getYarnLogDir()
public void setProperty(java.lang.String key, java.lang.String value)
key
- key value to set in this configurationvalue
- value related to set in this configurationpublic void printProperties() throws java.lang.Exception
java.lang.Exception
- if there is a problem to get the PrintWriterpublic RasterJob getJob()
public RasterJob createRasterJob()
public RasterJob createRasterLoaderJob()
public org.apache.hadoop.conf.Configuration getConf()
public void setGdalDataPath(java.lang.String gdalDataPath)
gdalDataPath
- is the path for GDAL_DATA directorypublic RasterJob createRasterProcessorJob()
public org.apache.hadoop.fs.FileSystem getFileSystem() throws java.io.IOException
FileSystem
object associated with this Configuration.java.io.IOException
- if there is a problem to get HDFS pointerpublic void setUser(java.lang.String user)
user
- user to set in this configurationpublic void setHdfsPathPrefix(java.lang.String hdfsPathPrefix)
hdfsPathPrefix
- HDFS path prefix to set in this configurationpublic void setBlockSize(int mb)
mb
- block size in megabytes to setpublic void setMapreduceJobJar(java.lang.String jobJar)
jobJar
- HDFS path prefix to set in this configurationpublic void setYarnApplicationClasspath(java.lang.String classpath)
classpath
- yarn application classpathpublic void setJobHistoryAddress(java.lang.String jobHistoryAddress)
jobHistoryAddress
- job history server address to set in this configurationpublic void setResourceManagerScheduler(java.lang.String resourceManagerScheduler)
resourceManagerScheduler
- scheduler interface to set in this configurationpublic void setResourceManagerAddress(java.lang.String resourceManagerAddress)
resourceManagerAddress
- addredd of the applications manager interface to set in this configurationCopyright © 2016 Oracle and/or its affiliates. All Rights Reserved.