Examples of HiveTableSchema


Examples of com.facebook.hiveio.schema.HiveTableSchema

  @Override
  public void checkOutputSpecs(JobContext context)
    throws IOException, InterruptedException {
    hiveOutputFormat.checkOutputSpecs(context);
    HiveTableSchema schema = hiveOutputFormat.getTableSchema(getConf());
    VertexToHive<I, V, E> vertexToHive = newVertexToHive(getConf(), schema);
    vertexToHive.checkOutput(makeOutputDesc(), schema,
        HiveRecordFactory.newWritableRecord(schema));
  }
View Full Code Here

Examples of com.facebook.hiveio.schema.HiveTableSchema

  @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

Examples of com.facebook.hiveio.schema.HiveTableSchema

  public void checkOutput(HiveOutputDescription outputDesc,
      HiveTableSchema schema, HiveWritableRecord emptyRecord) { }

  @Override
  public void initialize() {
    HiveTableSchema schema = getTableSchema();
    ImmutableClassesGiraphConfiguration conf = getConf();

    vertexIdWriter = HiveJythonUtils.newValueWriter(schema,
        VERTEX_ID_COLUMN, conf, GraphType.VERTEX_ID,
        GiraphHiveConstants.VERTEX_ID_WRITER_JYTHON_NAME);
View Full Code Here

Examples of com.facebook.hiveio.schema.HiveTableSchema

  @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

Examples of com.facebook.hiveio.schema.HiveTableSchema

  @Override
  public void initializeRecords(Iterator<HiveReadableRecord> records) {
    super.initializeRecords(records);

    HiveTableSchema schema = getTableSchema();
    ImmutableClassesGiraphConfiguration conf = getConf();

    sourceIdReader = HiveJythonUtils.<I>newValueReader(schema,
        EDGE_SOURCE_ID_COLUMN, conf, GraphType.VERTEX_ID,
        GiraphHiveConstants.VERTEX_ID_READER_JYTHON_NAME);
View Full Code Here

Examples of com.facebook.hiveio.schema.HiveTableSchema

  @Override
  public void initializeRecords(Iterator<HiveReadableRecord> records) {
    super.initializeRecords(records);

    HiveTableSchema schema = getTableSchema();
    ImmutableClassesGiraphConfiguration<I, V, E> conf = getConf();

    vertexIdReader = HiveJythonUtils.newValueReader(schema, VERTEX_ID_COLUMN,
        conf, GraphType.VERTEX_ID,
        GiraphHiveConstants.VERTEX_ID_READER_JYTHON_NAME);
View Full Code Here

Examples of com.facebook.hiveio.schema.HiveTableSchema

      table = client.get_table(inputDesc.getDbName(), inputDesc.getTableName());
    } catch (Exception e) {
      throw new IOException(e);
    }

    final HiveTableSchema tableSchema = HiveTableSchemaImpl.fromTable(table);
    HiveTableSchemas.put(conf, myProfileId, tableSchema);

    List<InputPartition> partitions = computePartitions(inputDesc, client, table);

    List<InputSplit> splits = computeSplits(conf, inputDesc, tableSchema, partitions);
View Full Code Here

Examples of com.facebook.hiveio.schema.HiveTableSchema

      outputInfo.setFinalOutputPath(outputInfo.getPartitionPath());
    } else {
      outputInfo.setFinalOutputPath(table.getSd().getLocation());
    }

    HiveTableSchema tableSchema = HiveTableSchemaImpl.fromTable(table);
    HiveTableSchemas.put(conf, profileId, tableSchema);

    OutputConf outputConf = new OutputConf(conf, profileId);
    outputConf.writeOutputDescription(outputDesc);
    outputConf.writeOutputTableInfo(outputInfo);
View Full Code Here

Examples of com.facebook.hiveio.schema.HiveTableSchema

  private RecordParser<Writable> getParser(Writable exampleValue,
    HInputSplit split, int[] columnIds, Configuration conf)
  {
    Deserializer deserializer = split.getDeserializer();
    String[] partitionValues = split.getPartitionValues();
    HiveTableSchema schema = split.getTableSchema();
    return Parsers.bestParser(deserializer, schema, columnIds,
        partitionValues, exampleValue, conf);
  }
View Full Code Here

Examples of com.facebook.hiveio.schema.HiveTableSchema

      outputInfo.setFinalOutputPath(outputInfo.getPartitionPath());
    } else {
      outputInfo.setFinalOutputPath(table.getSd().getLocation());
    }

    HiveTableSchema tableSchema = HiveTableSchemaImpl.fromTable(conf, table);
    HiveTableSchemas.put(conf, profileId, tableSchema);

    OutputConf outputConf = new OutputConf(conf, profileId);
    outputConf.writeOutputDescription(outputDesc);
    outputConf.writeOutputTableInfo(outputInfo);
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.