Examples of hadoopFile()


Examples of org.apache.spark.api.java.JavaSparkContext.hadoopFile()

    }
   
    JavaRDD<Indexed> base;
    File sourceFile = dataset.sourceFile;
    if (!sourceFile.getName().endsWith(".csv")) {
      JavaPairRDD<LongWritable, DataInputRecord> source = ctx.hadoopFile(sourceFile.getPath(), HBINInputFormat.class, LongWritable.class, DataInputRecord.class);
      base = (JavaRDD<Indexed>) (JavaRDD) source.map(new Function<Tuple2<LongWritable, DataInputRecord>, DataInputRecord>() {
        public DataInputRecord call(Tuple2<LongWritable, DataInputRecord> pair) throws Exception {return pair._2;}
      });
    } else {
      JavaRDD<String> source = ctx.textFile(sourceFile.getCanonicalPath());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.