Examples of encodePartition()


Examples of com.linkedin.camus.etl.Partitioner.encodePartition()

        job.getConfiguration().setBoolean(ETL_RUN_TRACKING_POST, value);
    }

    public static String getWorkingFileName(JobContext context, EtlKey key) throws IOException {
        Partitioner partitioner = getPartitioner(context, key.getTopic());
        return partitioner.getWorkingFileName(context, key.getTopic(), key.getLeaderId(), key.getPartition(), partitioner.encodePartition(context, key));
    }
   
    public static void setDefaultPartitioner(JobContext job, Class<?> cls) {
      job.getConfiguration().setClass(ETL_DEFAULT_PARTITIONER_CLASS, cls, Partitioner.class);
    }
View Full Code Here

Examples of com.linkedin.camus.etl.kafka.partitioner.DefaultPartitioner.encodePartition()

        Job testJob = new Job(new Configuration());

        DefaultPartitioner testPartitioner = new DefaultPartitioner();
        testPartitioner.setConf(testConfiguration);

        String actualResult = testPartitioner.encodePartition(testJob, testEtlKey);
        String expectedResult = "1400547600000";

        assertTrue(actualResult.equals(expectedResult));

    }
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.