Examples of HiveTableSchema


Examples of com.facebook.hiveio.schema.HiveTableSchema

    } catch (Exception e) {
      // CHECKSTYLE: resume IllegalCatch
      throw new IOException(e);
    }

    final HiveTableSchema tableSchema = HiveTableSchemaImpl.fromTable(conf, 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

  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

   * @param <X> type of Java bean
   * @return RowToBean
   */
  public static <X> RowToBean<X> rowToBean(HiveInputDescription inputDesc, Class<X> rowClass) {
    HiveConf conf = HiveUtils.newHiveConf(HiveInput.class);
    HiveTableSchema schema = HiveTableSchemas.lookup(conf, inputDesc.getTableDesc());
    RowToBean<X> rowToBean = new UnsafeRowToBean<X>(rowClass, schema);
    return rowToBean;
  }
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

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

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.putToConf(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

    outputDesc.setTableDesc(hiveTableDesc);

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

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

    List<HiveWritableRecord> writeRecords = Lists.newArrayList();
    HiveWritableRecord writeRecord = HiveRecordFactory.newWritableRecord(schema);
    writeRecords.add(writeRecord);
View Full Code Here

Examples of com.facebook.hiveio.schema.HiveTableSchema

    outputDesc.setTableDesc(hiveTableDesc);

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

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

    List<HiveWritableRecord> writeRecords = Lists.newArrayList();
    HiveWritableRecord r1 = HiveRecordFactory.newWritableRecord(schema);
    writeRecords.add(r1);
View Full Code Here

Examples of com.facebook.hiveio.schema.HiveTableSchema

        " ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'");

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

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

    writeData(outputDesc, schema);

    HiveInputDescription inputDesc = new HiveInputDescription();
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.