You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Davor Bonaci (JIRA)" <ji...@apache.org> on 2017/04/02 06:49:41 UTC
[jira] [Assigned] (BEAM-1856) HDFSFileSink class do not use the
same configuration in master and slave
[ https://issues.apache.org/jira/browse/BEAM-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Davor Bonaci reassigned BEAM-1856:
----------------------------------
Assignee: yangping wu (was: Davor Bonaci)
> HDFSFileSink class do not use the same configuration in master and slave
> ------------------------------------------------------------------------
>
> Key: BEAM-1856
> URL: https://issues.apache.org/jira/browse/BEAM-1856
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-extensions
> Affects Versions: 0.6.0
> Reporter: yangping wu
> Assignee: yangping wu
>
> I have a code snippet as follow:
> {code}
> Read.Bounded<KV<LongWritable, Text>> from = Read.from(HDFSFileSource.from(options.getInputFile(), TextInputFormat.class, LongWritable.class, Text.class));
> PCollection<KV<LongWritable, Text>> data = p.apply(from);
> data.apply(MapElements.via(new SimpleFunction<KV<LongWritable, Text>, String>() {
> @Override
> public String apply(KV<LongWritable, Text> input) {
> return input.getValue() + "\t" + input.getValue();
> }
> })).apply(Write.to(HDFSFileSink.<String>toText(options.getOutputFile())));
> {code}
> and submit job like this:
> {code}
> spark-submit --class org.apache.beam.examples.WordCountHDFS --master yarn-client \
> ./target/word-count-beam-bundled-0.1.jar \
> --runner=SparkRunner \
> --inputFile=hdfs://master/tmp/input/ \
> --outputFile=/tmp/output/
> {code}
> Then {{HDFSFileSink.validate}} function will check whether the local filesystem (not HDFS) exists {{/tmp/output/}} directory.
> But the final result will store in {{hdfs://master/tmp/output/}} directory in HDFS filesystem.
> The reason is {{HDFSFileSink}} class do not use the same configuration in master thread and slave thread.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)