[
https://issues.apache.org/jira/browse/BEAM-2031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15983776#comment-15983776
]
Stephen Sisk commented on BEAM-2031:
------------------------------------
We need to allow users to pass in Configuration for hadoop - it's the way to
set up connection info/etc.. (Configuration is the hadoop class that manages
this - kinda sorta similar to PipelineOptions, but it is more like a generic
bag than ours)
>From a reading of the Configuration source code, Configuration objects can
>store int/float/bool/etc..., but those are ultimately stored as strings.
In both scenarios it seems useful to handle the configuration as a simple flat
json map, so the user would pass in the configuration like so:
--hdfsConfiguration={
'fs.default.name': 'hdfs://my-host:8020/,
'another-key': 'value',
'a-third-key': 'another-value'}
in line in a larger commandline:
mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount \
-Dexec.args="--runner=DataflowRunner \
--inputFile=hdfs://my-host/shakespeare/*
--output=hdfs://my-host/counts \
--hdfsConfiguration={'fs.default.name': 'hdfs://my-host:8020/,
'another-key': 'value', 'a-third-key': 'another-value'} \
-Pdataflow-runner
I propose handling the PipelineOption type as Map<String, String> and then we
call set for each key/value pair.
I'm going to test this out to see if there are any holes in my understanding of
how this all works.
cc [~davor]
> Hadoop FileSystem needs to receive Hadoop Configuration through
> PipelineOptions
> -------------------------------------------------------------------------------
>
> Key: BEAM-2031
> URL: https://issues.apache.org/jira/browse/BEAM-2031
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-java-extensions
> Reporter: Stephen Sisk
> Assignee: Stephen Sisk
> Fix For: First stable release
>
>
> Since Beam FileSystem objects are configured via PipelineOptions, we need to
> pass a Hadoop Configuration through PipelineOptions. I think that's very
> solvable, but it does seem semi-complicated.
> cc [[email protected]] I believe you mentioned in the past that you had an
> answer to this - is that written down anywhere?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)