Package org.apache.druid.indexer
Class HadoopDruidIndexerConfig
- java.lang.Object
-
- org.apache.druid.indexer.HadoopDruidIndexerConfig
-
public class HadoopDruidIndexerConfig extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHadoopDruidIndexerConfig.IndexJobCounters
-
Field Summary
Fields Modifier and Type Field Description static org.apache.druid.segment.IndexIOINDEX_IOstatic com.fasterxml.jackson.databind.ObjectMapperJSON_MAPPERstatic PropertiesPROPERTIESHadoop tasks running in an Indexer process need a reference to the Properties instance created in PropertiesModule so that the task sees properties that were specified in Druid's config files.
-
Constructor Summary
Constructors Constructor Description HadoopDruidIndexerConfig(HadoopIngestionSpec spec)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.hadoop.mapreduce.JobaddInputPaths(org.apache.hadoop.mapreduce.Job job)Job instance should have Configuration set (by callingaddJobProperties(Job)or via injected system properties) before this method is called.static HadoopDruidIndexerConfigfromConfiguration(org.apache.hadoop.conf.Configuration conf)static HadoopDruidIndexerConfigfromDistributedFileSystem(String path)static HadoopDruidIndexerConfigfromFile(File file)static HadoopDruidIndexerConfigfromSpec(HadoopIngestionSpec spec)static HadoopDruidIndexerConfigfromString(String str)Map<String,String>getAllowedProperties()StringgetDataSource()org.apache.druid.segment.indexing.granularity.GranularitySpecgetGranularitySpec()org.apache.druid.segment.IndexSpecgetIndexSpec()org.apache.druid.segment.IndexSpecgetIndexSpecForIntermediatePersists()List<org.joda.time.Interval>getInputIntervals()com.google.common.base.Optional<List<org.joda.time.Interval>>getIntervals()intgetMaxParseExceptions()org.apache.druid.data.input.impl.InputRowParsergetParser()org.apache.druid.indexer.partitions.DimensionBasedPartitionsSpecgetPartitionsSpec()PathSpecgetPathSpec()HadoopIngestionSpecgetSchema()HadoopyShardSpecgetShardSpec(Bucket bucket)intgetTargetPartitionSize()StringgetWorkingPath()voidintoConfiguration(org.apache.hadoop.mapreduce.Job job)booleanisCombineText()booleanisLogParseExceptions()booleanisUpdaterJobSpecSet()voidsetGranularitySpec(org.apache.druid.segment.indexing.granularity.GranularitySpec granularitySpec)voidsetShardSpecs(Map<Long,List<HadoopyShardSpec>> shardSpecs)voidverify()
-
-
-
Field Detail
-
JSON_MAPPER
public static final com.fasterxml.jackson.databind.ObjectMapper JSON_MAPPER
-
INDEX_IO
public static final org.apache.druid.segment.IndexIO INDEX_IO
-
PROPERTIES
public static final Properties PROPERTIES
Hadoop tasks running in an Indexer process need a reference to the Properties instance created in PropertiesModule so that the task sees properties that were specified in Druid's config files.This is not strictly necessary for Peon-based tasks which have all properties, including config file properties, specified on their command line by ForkingTaskRunner (so they could use System.getProperties() only), but we always use the injected Properties for consistency.
-
-
Constructor Detail
-
HadoopDruidIndexerConfig
public HadoopDruidIndexerConfig(HadoopIngestionSpec spec)
-
-
Method Detail
-
fromSpec
public static HadoopDruidIndexerConfig fromSpec(HadoopIngestionSpec spec)
-
fromFile
public static HadoopDruidIndexerConfig fromFile(File file)
-
fromString
public static HadoopDruidIndexerConfig fromString(String str)
-
fromDistributedFileSystem
public static HadoopDruidIndexerConfig fromDistributedFileSystem(String path)
-
fromConfiguration
public static HadoopDruidIndexerConfig fromConfiguration(org.apache.hadoop.conf.Configuration conf)
-
getSchema
public HadoopIngestionSpec getSchema()
-
getPathSpec
public PathSpec getPathSpec()
-
getDataSource
public String getDataSource()
-
getGranularitySpec
public org.apache.druid.segment.indexing.granularity.GranularitySpec getGranularitySpec()
-
setGranularitySpec
public void setGranularitySpec(org.apache.druid.segment.indexing.granularity.GranularitySpec granularitySpec)
-
getPartitionsSpec
public org.apache.druid.indexer.partitions.DimensionBasedPartitionsSpec getPartitionsSpec()
-
getIndexSpec
public org.apache.druid.segment.IndexSpec getIndexSpec()
-
getIndexSpecForIntermediatePersists
public org.apache.druid.segment.IndexSpec getIndexSpecForIntermediatePersists()
-
setShardSpecs
public void setShardSpecs(Map<Long,List<HadoopyShardSpec>> shardSpecs)
-
getIntervals
public com.google.common.base.Optional<List<org.joda.time.Interval>> getIntervals()
-
getTargetPartitionSize
public int getTargetPartitionSize()
-
isUpdaterJobSpecSet
public boolean isUpdaterJobSpecSet()
-
isCombineText
public boolean isCombineText()
-
getParser
public org.apache.druid.data.input.impl.InputRowParser getParser()
-
getShardSpec
public HadoopyShardSpec getShardSpec(Bucket bucket)
-
isLogParseExceptions
public boolean isLogParseExceptions()
-
getMaxParseExceptions
public int getMaxParseExceptions()
-
addInputPaths
public org.apache.hadoop.mapreduce.Job addInputPaths(org.apache.hadoop.mapreduce.Job job) throws IOExceptionJob instance should have Configuration set (by callingaddJobProperties(Job)or via injected system properties) before this method is called. ThePathSpecmay create objects which depend on the values of these configurations.- Throws:
IOException
-
getInputIntervals
public List<org.joda.time.Interval> getInputIntervals()
-
getWorkingPath
public String getWorkingPath()
-
intoConfiguration
public void intoConfiguration(org.apache.hadoop.mapreduce.Job job)
-
verify
public void verify()
-
-