[ 
https://issues.apache.org/jira/browse/BEAM-2368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

liyuntian closed BEAM-2368.
---------------------------
       Resolution: Won't Fix
    Fix Version/s: 2.0.0

> one throw "Unable to find registrar for hdfs" with same code
> ------------------------------------------------------------
>
>                 Key: BEAM-2368
>                 URL: https://issues.apache.org/jira/browse/BEAM-2368
>             Project: Beam
>          Issue Type: Test
>          Components: runner-spark
>            Reporter: liyuntian
>            Assignee: Amit Sela
>             Fix For: 2.0.0
>
>
> I have the same code: 
> BeamConfiguration.beamConfiguration();
> HadoopFileSystemOptions options = 
> PipelineOptionsFactory.as(HadoopFileSystemOptions.class);
> options.setHdfsConfiguration(Collections.singletonList(config));
> options.setRunner(SparkRunner.class);
> Pipeline pipeline = Pipeline.create(options);
>  PCollection<String> recordsFromHdfs = 
> pipeline.apply(TextIO.read().from(inputPath));
> nextPCollection = recordsFromHdfs......
> PCollection<String> recordsToHdfs = nextPCollection.apply(ParDo.of(new 
> OutputHdfsFileFn(delimit)));
> recordsToHdfs.apply(TextIO.write().to(outputPath));
> pipeline.run().waitUntilFinish();
> one run successfully,but another throw exception like this:17/05/26 12:02:38 
> ERROR yarn.ApplicationMaster: User class threw exception: 
> java.lang.IllegalStateException: Unable to find registrar for hdfs
> java.lang.IllegalStateException: Unable to find registrar for hdfs
>       at 
> org.apache.beam.sdk.io.FileSystems.getFileSystemInternal(FileSystems.java:447)
>       at 
> org.apache.beam.sdk.io.FileSystems.matchNewResource(FileSystems.java:523)
>       at 
> org.apache.beam.sdk.io.FileBasedSink.convertToFileResourceIfPossible(FileBasedSink.java:204)
>       at org.apache.beam.sdk.io.TextIO$Write.to(TextIO.java:294)
>       at 
> com.chinamobile.cmss.etl.beam.transform.server.SparkMain.main(SparkMain.java:77)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at 
> org.apache.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:558)
> 17/05/26 12:02:38 INFO yarn.ApplicationMaster: Final app status: FAILED, 
> exitCode: 15, (reason: User class threw exception: 
> java.lang.IllegalStateException: Unable to find registrar for hdfs)
> I find it will setDefaultPipelineOptions(PipelineOptions options) using 
> hdfs,why I always get execuption ?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to