ccaominh commented on issue #8899: HDFS input source
URL: https://github.com/apache/incubator-druid/pull/8899#issuecomment-555819133
 
 
   Manually tested with HDFS setup from the hadoop quickstart tutorial 
(https://druid.apache.org/docs/latest/tutorials/tutorial-batch-hadoop.html) and 
the following ingestion spec modified from the hadoop tutorial to use 
`index_parallel` with the new HDFS input source (there are a few extra JSON 
properties, but they get ignored):
   
   ```json
   {
     "type" : "index_parallel",
     "spec" : {
       "dataSchema" : {
         "dataSource" : "wikipedia",
         "dimensionsSpec" : {
           "dimensions" : [
             "channel",
             "cityName",
             "comment",
             "countryIsoCode",
             "countryName",
             "isAnonymous",
             "isMinor",
             "isNew",
             "isRobot",
             "isUnpatrolled",
             "metroCode",
             "namespace",
             "page",
             "regionIsoCode",
             "regionName",
             "user",
             { "name": "added", "type": "long" },
             { "name": "deleted", "type": "long" },
             { "name": "delta", "type": "long" }
           ]
         },
         "timestampSpec" : {
           "format" : "auto",
           "column" : "time"
         },
         "metricsSpec" : [],
         "granularitySpec" : {
           "type" : "uniform",
           "segmentGranularity" : "day",
           "queryGranularity" : "none",
           "intervals" : ["2015-09-12/2015-09-13"],
           "rollup" : false
         }
       },
       "ioConfig" : {
         "type" : "index_parallel",
         "inputSource" : {
           "type" : "hdfs",
           "paths" : "/quickstart/wikiticker-2015-09-12-sampled.json.gz"
         },
         "inputFormat" : {
            "type" : "json"
         }
       },
       "tuningConfig" : {
         "type" : "index_parallel",
         "partitionsSpec" : {
           "type" : "hashed",
           "numShards" : 2
         },
         "forceGuaranteedRollup" : true,
         "forceExtendableShardSpecs" : true,
         "jobProperties" : {
           "fs.default.name" : "hdfs://druid-hadoop-demo:9000",
           "fs.defaultFS" : "hdfs://druid-hadoop-demo:9000",
           "dfs.datanode.address" : "druid-hadoop-demo",
           "dfs.client.use.datanode.hostname" : "true",
           "dfs.datanode.use.datanode.hostname" : "true",
           "yarn.resourcemanager.hostname" : "druid-hadoop-demo",
           "yarn.nodemanager.vmem-check-enabled" : "false",
           "mapreduce.map.java.opts" : "-Duser.timezone=UTC 
-Dfile.encoding=UTF-8",
           "mapreduce.job.user.classpath.first" : "true",
           "mapreduce.reduce.java.opts" : "-Duser.timezone=UTC 
-Dfile.encoding=UTF-8",
           "mapreduce.map.memory.mb" : 1024,
           "mapreduce.reduce.memory.mb" : 1024
         }
       }
     },
     "hadoopDependencyCoordinates": ["org.apache.hadoop:hadoop-client:2.8.3"]
   }
   
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to