Package com.facebook.hiveio.output

Examples of com.facebook.hiveio.output.HiveOutputDescription


   * Create HiveOutputDescription from Configuration
   *
   * @return HiveOutputDescription
   */
  private HiveOutputDescription makeOutputDesc() {
    HiveOutputDescription outputDesc = new HiveOutputDescription();
    HiveTableDesc tableDesc = outputDesc.getTableDesc();
    tableDesc.setDatabaseName(HIVE_VERTEX_OUTPUT_DATABASE.get(getConf()));
    tableDesc.setTableName(HIVE_VERTEX_OUTPUT_TABLE.get(getConf()));
    outputDesc.setPartitionValues(
        parsePartitionValues(HIVE_VERTEX_OUTPUT_PARTITION.get(getConf())));
    return outputDesc;
  }
View Full Code Here


   *
   * @param conf Configuration
   * @throws IOException
   */
  public static void setupJob(Configuration conf) throws IOException {
    HiveOutputDescription outputDesc = new HiveOutputDescription();
    outputDesc.setTableDesc(getHiveTableName());
    Map<String, String> partitionValues = ImmutableMap.of("ds", "2013-04-01");
    outputDesc.setPartitionValues(partitionValues);
    LOG.info("Writing to {}", outputDesc);
    try {
      HiveApiOutputFormat.initProfile(conf, outputDesc, SampleOutputFormat.SAMPLE_PROFILE_ID);
    } catch (IOException e) {
      LOG.error("Failed to initialize profile {}", outputDesc);
View Full Code Here

  }

  @Test
  public void testCheck() throws Exception {
    VertexToHive vertexToHive = new HiveOutputIntIntVertex();
    HiveOutputDescription outputDesc = new HiveOutputDescription();
    HiveTableSchema schema = TestSchema.builder()
        .addColumn("foo", HiveType.LONG)
        .addColumn("bar", HiveType.LONG)
        .build();
    vertexToHive.checkOutput(outputDesc, schema, newWritableRecord(schema));
View Full Code Here

  public static final List<MapWritable> mapperData2 = ImmutableList.of(row3, row4);

  private HiveTools() {}

  public static void setupJob(Configuration conf) throws IOException {
    HiveOutputDescription outputDesc = new HiveOutputDescription();
    outputDesc.setDbName("default");
    outputDesc.setTableName("hive_io_test");
    Map<String, String> partitionValues = ImmutableMap.of("ds", "2013-04-01");
    outputDesc.setPartitionValues(partitionValues);
    LOG.info("Writing to {}", outputDesc);
    try {
      HiveApiOutputFormat.initProfile(conf, outputDesc, SampleOutputFormat.SAMPLE_PROFILE_ID);
    } catch (TException e) {
      LOG.error("Failed to initialize profile {}", outputDesc);
View Full Code Here

   *
   * @param conf Configuration
   * @throws IOException
   */
  public static void setupJob(Configuration conf) throws IOException {
    HiveOutputDescription outputDesc = new HiveOutputDescription();
    outputDesc.setTableDesc(getHiveTableName());
    Map<String, String> partitionValues = ImmutableMap.of("ds", "2013-04-01");
    outputDesc.setPartitionValues(partitionValues);
    LOG.info("Writing to {}", outputDesc);
    try {
      HiveApiOutputFormat.initProfile(conf, outputDesc, SampleOutputFormat.SAMPLE_PROFILE_ID);
    } catch (TException e) {
      LOG.error("Failed to initialize profile {}", outputDesc);
View Full Code Here

TOP

Related Classes of com.facebook.hiveio.output.HiveOutputDescription

Copyright © 2018 www.massapicom. 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.