Examples of HdfsExportPartitioner


Examples of org.apache.sqoop.job.etl.HdfsExportPartitioner

    FileUtils.mkdirs(indir);
    createTextInput(null);
    Configuration conf = new Configuration();
    conf.set(JobConstants.HADOOP_INPUTDIR, indir);

    HdfsExportPartitioner partitioner = new HdfsExportPartitioner();
    PrefixContext prefixContext = new PrefixContext(conf, "");
    int[] partitionValues = {2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 17};

    for(int maxPartitions : partitionValues) {
      PartitionerContext partCont = new PartitionerContext(prefixContext, maxPartitions, null);
      List<Partition> partitionList = partitioner.getPartitions(partCont, null, null);
      assertTrue(partitionList.size()<=maxPartitions);
    }
  }
View Full Code Here

Examples of org.apache.sqoop.job.etl.HdfsExportPartitioner

    FileUtils.mkdirs(indir);
    createTextInput(null);
    Configuration conf = new Configuration();
    conf.set(JobConstants.HADOOP_INPUTDIR, indir);

    HdfsExportPartitioner partitioner = new HdfsExportPartitioner();
    PrefixContext prefixContext = new PrefixContext(conf, "");
    int[] partitionValues = {2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 17};

    for(int maxPartitions : partitionValues) {
      PartitionerContext partCont = new PartitionerContext(prefixContext, maxPartitions);
      List<Partition> partitionList = partitioner.getPartitions(partCont, null, null);
      assertTrue(partitionList.size()<=maxPartitions);
    }
  }
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.