Package com.facebook.hiveio.input

Examples of com.facebook.hiveio.input.HiveInputDescription


  public HiveEdgeInputFormat() {
    hiveInputFormat = new HiveApiInputFormat();
  }

  @Override public void checkInputSpecs(Configuration conf) {
    HiveInputDescription inputDesc =
        GiraphHiveConstants.HIVE_VERTEX_INPUT.makeInputDescription(conf);
    HiveTableSchema schema = getTableSchema();
    HiveToEdge<I, E> hiveToEdge = HiveUtils.newHiveToEdge(getConf(), schema);
    hiveToEdge.checkInput(inputDesc, schema);
  }
View Full Code Here


    hiveInputFormat = new HiveApiInputFormat();
  }

  @Override
  public void checkInputSpecs(Configuration conf) {
    HiveInputDescription inputDesc =
        GiraphHiveConstants.HIVE_VERTEX_INPUT.makeInputDescription(conf);
    HiveTableSchema schema = getTableSchema();
    HiveToVertex<I, V, E> hiveToVertex = newHiveToVertex(getConf(), schema);
    hiveToVertex.checkInput(inputDesc, schema);
  }
View Full Code Here

    hiveInputFormat = new HiveApiInputFormat();
  }

  @Override
  public void checkInputSpecs(Configuration conf) {
    HiveInputDescription inputDesc =
        GiraphHiveConstants.HIVE_MAPPING_INPUT.makeInputDescription(conf);
    HiveTableSchema schema = getTableSchema();
    HiveToMapping<I, B> hiveToMapping = newHiveToMapping(getConf(), schema);
    hiveToMapping.checkInput(inputDesc, schema);
  }
View Full Code Here

   * Create a HiveInputDescription from the options in the Configuration
   * @param conf Configuration
   * @return HiveInputDescription
   */
  public HiveInputDescription makeInputDescription(Configuration conf) {
    HiveInputDescription inputDescription = new HiveInputDescription();
    inputDescription.getTableDesc().setDatabaseName(databaseOpt.get(conf));
    inputDescription.getTableDesc().setTableName(tableOpt.get(conf));
    inputDescription.setPartitionFilter(partitionOpt.get(conf));
    inputDescription.setNumSplits(splitsOpt.get(conf));
    inputDescription.getMetastoreDesc().setHost(hostOpt.get(conf));
    inputDescription.getMetastoreDesc().setPort(portOpt.get(conf));
    return inputDescription;
  }
View Full Code Here

    HiveOutputDescription outputDesc = new HiveOutputDescription();
    outputDesc.setTableName(tableName);

    writeData(outputDesc);

    HiveInputDescription inputDesc = new HiveInputDescription();
    inputDesc.setTableName(tableName);

    verifyData(inputDesc);
  }
View Full Code Here

    outputDesc.putPartitionValue("ds", "foobar");
    outputDesc.setTableName(tableName);

    writeData(outputDesc);

    HiveInputDescription inputDesc = new HiveInputDescription();
    inputDesc.setPartitionFilter("ds='foobar'");
    inputDesc.setTableName(tableName);

    verifyData(inputDesc);
  }
View Full Code Here

    HadoopNative.requireHadoopNative();

    Timer allTime = Metrics.newTimer(InputBenchmark.class, "all-time", MILLISECONDS, MILLISECONDS);
    TimerContext allTimerContext = allTime.time();

    HiveInputDescription input = new HiveInputDescription();
    input.getTableDesc().setDatabaseName(args.tableOpts.database);
    input.getTableDesc().setTableName(args.tableOpts.table);
    input.setPartitionFilter(args.tableOpts.partitionFilter);
    input.getMetastoreDesc().setHost(args.metastoreOpts.host);
    input.getMetastoreDesc().setPort(args.metastoreOpts.port);

    HiveConf hiveConf = HiveUtils.newHiveConf(InputBenchmark.class);

    System.err.println("Initialize profile with input data");
    HiveApiInputFormat.setProfileInputDesc(hiveConf, input, DEFAULT_PROFILE_ID);
View Full Code Here

    HiveTableSchema schema = HiveTableSchemas.lookup(hiveServer.getClient(),
        null, hiveTableDesc);

    writeData(outputDesc, schema);

    HiveInputDescription inputDesc = new HiveInputDescription();
    inputDesc.setTableDesc(hiveTableDesc);

    verifyData(inputDesc);
  }
View Full Code Here

    HiveTableSchema schema = HiveTableSchemas.lookup(hiveServer.getClient(),
        null, hiveTableDesc);

    writeData(outputDesc, schema);

    HiveInputDescription inputDesc = new HiveInputDescription();
    inputDesc.setPartitionFilter("ds='foobar'");
    inputDesc.setTableDesc(hiveTableDesc);

    verifyData(inputDesc);
  }
View Full Code Here

    createTestTable();

    HiveOutputDescription outputDesc = new HiveOutputDescription();
    outputDesc.setTableDesc(hiveTableDesc);

    HiveInputDescription inputDesc = new HiveInputDescription();
    inputDesc.setTableDesc(hiveTableDesc);

    HiveTableSchema schema = HiveTableSchemas.lookup(hiveServer.getClient(),
        null, hiveTableDesc);

    List<HiveWritableRecord> writeRecords = Lists.newArrayList();
View Full Code Here

TOP

Related Classes of com.facebook.hiveio.input.HiveInputDescription

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.