Examples of HiveInputDescription


Examples of com.facebook.hiveio.input.HiveInputDescription

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

    writeData(outputDesc);

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

    verifyData(inputDesc);
  }
View Full Code Here

Examples of com.facebook.hiveio.input.HiveInputDescription

    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

Examples of com.facebook.hiveio.input.HiveInputDescription

    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

Examples of com.facebook.hiveio.input.HiveInputDescription

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

    writeData(outputDesc, schema);

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

    verifyData(inputDesc);
  }
View Full Code Here

Examples of com.facebook.hiveio.input.HiveInputDescription

    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

Examples of com.facebook.hiveio.input.HiveInputDescription

    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

Examples of com.facebook.hiveio.input.HiveInputDescription

    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

Examples of com.facebook.hiveio.input.HiveInputDescription

    LOG.info("Creating Hive client for Metastore at {}", metastoreHostPort);
    ThriftHiveMetastore.Iface client = HiveMetastores.create(
        metastoreHostPort.host, metastoreHostPort.port);

    HiveInputDescription inputDesc = initInput(metastoreHostPort);

    HiveStats hiveStats = HiveUtils.statsOf(client, inputDesc);
    LOG.info("{}", hiveStats);

    HiveConf hiveConf = HiveUtils.newHiveConf(TailerCmd.class);
View Full Code Here

Examples of com.facebook.hiveio.input.HiveInputDescription

   *
   * @param metastoreHostPort metastore location info
   * @return HiveInputDescription
   */
  private HiveInputDescription initInput(HostPort metastoreHostPort) {
    HiveInputDescription inputDesc = new HiveInputDescription();
    inputDesc.getTableDesc().setDatabaseName(args.inputTable.database);
    inputDesc.getTableDesc().setTableName(args.inputTable.table);
    inputDesc.setPartitionFilter(args.inputTable.partitionFilter);
    args.splits.compute(args.multiThread.threads);
    inputDesc.setNumSplits(args.splits.requestNumSplits);
    inputDesc.getMetastoreDesc().setHost(metastoreHostPort.host);
    inputDesc.getMetastoreDesc().setPort(metastoreHostPort.port);
    return inputDesc;
  }
View Full Code Here

Examples of com.facebook.hiveio.input.HiveInputDescription

    InternalVertexRunner.run(conf, new String[0], new String[0]);

    Helpers.commitJob(conf);

    HiveInputDescription inputDesc = new HiveInputDescription();
    inputDesc.getTableDesc().setTableName(outputTable);

    Iterator<HiveReadableRecord> records = HiveInput.readTable(inputDesc).iterator();

    int expected[] = { -1, 1, 2, -1, 1 };
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.