org.apache.hadoop.hive.ql.metadata.Table.setOutputFormatClass()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中org.apache.hadoop.hive.ql.metadata.Table.setOutputFormatClass()方法的一些代码示例,展示了Table.setOutputFormatClass()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setOutputFormatClass()方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Table
类名称:Table
方法名:setOutputFormatClass

Table.setOutputFormatClass介绍

暂无

代码示例

代码示例来源:origin: apache/hive

public void setOutputFormatClass(String name) throws HiveException {
 if (name == null) {
  outputFormatClass = null;
  tTable.getSd().setOutputFormat(null);
  return;
 }
 try {
  Class<?> origin = Class.forName(name, true, Utilities.getSessionSpecifiedClassLoader());
  setOutputFormatClass(HiveFileFormatUtils.getOutputFormatSubstitute(origin));
 } catch (ClassNotFoundException e) {
  throw new HiveException("Class not found: " + name, e);
 }
}

代码示例来源:origin: apache/drill

public void setOutputFormatClass(String name) throws HiveException {
 if (name == null) {
  outputFormatClass = null;
  tTable.getSd().setOutputFormat(null);
  return;
 }
 try {
  Class<?> origin = Class.forName(name, true, Utilities.getSessionSpecifiedClassLoader());
  setOutputFormatClass(HiveFileFormatUtils.getOutputFormatSubstitute(origin));
 } catch (ClassNotFoundException e) {
  throw new HiveException("Class not found: " + name, e);
 }
}

代码示例来源:origin: apache/hive

private static Table createTestTable(String dbName, String tableName) throws HiveException {
 Table tbl = new Table(dbName, tableName);
 tbl.setInputFormatClass(SequenceFileInputFormat.class.getName());
 tbl.setOutputFormatClass(SequenceFileOutputFormat.class.getName());
 tbl.setSerializationLib(ThriftDeserializer.class.getName());
 tbl.setSerdeParam(serdeConstants.SERIALIZATION_CLASS, Complex.class.getName());
 tbl.setSerdeParam(serdeConstants.SERIALIZATION_FORMAT, TBinaryProtocol.class
   .getName());
 return tbl;
}

代码示例来源:origin: apache/hive

protected Table getDummyTable() throws SemanticException {
 Path dummyPath = createDummyFile();
 Table desc = new Table(DUMMY_DATABASE, DUMMY_TABLE);
 desc.getTTable().getSd().setLocation(dummyPath.toString());
 desc.getTTable().getSd().getSerdeInfo().setSerializationLib(NullStructSerDe.class.getName());
 desc.setInputFormatClass(NullRowsInputFormat.class);
 desc.setOutputFormatClass(HiveIgnoreKeyTextOutputFormat.class);
 return desc;
}

代码示例来源:origin: apache/drill

private Table getDummyTable() throws SemanticException {
 Path dummyPath = createDummyFile();
 Table desc = new Table(DUMMY_DATABASE, DUMMY_TABLE);
 desc.getTTable().getSd().setLocation(dummyPath.toString());
 desc.getTTable().getSd().getSerdeInfo().setSerializationLib(NullStructSerDe.class.getName());
 desc.setInputFormatClass(NullRowsInputFormat.class);
 desc.setOutputFormatClass(HiveIgnoreKeyTextOutputFormat.class);
 return desc;
}

代码示例来源:origin: apache/hive

table.setStoredAsSubDirectories(false);
table.setInputFormatClass(format.getInputFormat());
table.setOutputFormatClass(format.getOutputFormat());
db.createTable(table, true);

代码示例来源:origin: apache/hive

tbl.setOutputFormatClass(fileOutputFormat.getName());

代码示例来源:origin: apache/drill

tbl.setOutputFormatClass(fileOutputFormat.getName());

代码示例来源:origin: apache/drill

table.setStoredAsSubDirectories(false);
table.setInputFormatClass(format.getInputFormat());
table.setOutputFormatClass(format.getOutputFormat());
db.createTable(table, true);

代码示例来源:origin: apache/hive

table.setDbName(dbName);
table.setInputFormatClass(TextInputFormat.class);
table.setOutputFormatClass(HiveIgnoreKeyTextOutputFormat.class);

代码示例来源:origin: apache/hive

tbl.setOutputFormatClass(SequenceFileOutputFormat.class.getName());
tbl.setSerializationLib(ThriftDeserializer.class.getName());
tbl.setSerdeParam(serdeConstants.SERIALIZATION_CLASS, Complex.class.getName());

代码示例来源:origin: apache/hive

@Test
public void testDataDeletion() throws HiveException,
 IOException, TException {
 Database db = new Database();
 db.setName(dbName);
 hive.createDatabase(db);
 Table table = new Table(dbName, tableName);
 table.setDbName(dbName);
 table.setInputFormatClass(TextInputFormat.class);
 table.setOutputFormatClass(HiveIgnoreKeyTextOutputFormat.class);
 table.setPartCols(partCols);
 hive.createTable(table);
 table = hive.getTable(dbName, tableName);
 Path fakeTable = table.getPath().getParent().suffix(
   Path.SEPARATOR + "faketable");
 fs = fakeTable.getFileSystem(hive.getConf());
 fs.mkdirs(fakeTable);
 fs.deleteOnExit(fakeTable);
 Path fakePart = new Path(table.getDataLocation().toString(),
   "fakepartition=fakevalue");
 fs.mkdirs(fakePart);
 fs.deleteOnExit(fakePart);
 hive.dropTable(dbName, tableName, true, true);
 assertFalse(fs.exists(fakePart));
 hive.dropDatabase(dbName);
 assertFalse(fs.exists(fakeTable));
}

代码示例来源:origin: apache/hive

tbl.setOutputFormatClass(crtTbl.getDefaultOutputFormat());
 tbl.setOutputFormatClass(crtTbl.getDefaultOutputFormat());
 tbl.getTTable().getSd().setInputFormat(
 tbl.getInputFormatClass().getName());

代码示例来源:origin: apache/drill

table.setStoredAsSubDirectories(false);
 table.setInputFormatClass(format.getInputFormat());
 table.setOutputFormatClass(format.getOutputFormat());
 db.createTable(table, false);
} catch (Exception e) {

代码示例来源:origin: apache/hive

tbl.setOutputFormatClass(getOutputFormat());
tbl.setOutputFormatClass(getOutputFormat());
if (getInputFormat() != null && !getInputFormat().isEmpty()) {
 tbl.getSd().setInputFormat(tbl.getInputFormatClass().getName());

代码示例来源:origin: apache/hive

table.setDbName(dbName);
table.setInputFormatClass(TextInputFormat.class);
table.setOutputFormatClass(HiveIgnoreKeyTextOutputFormat.class);

代码示例来源:origin: apache/hive

tbl.setFields(fields);
tbl.setOutputFormatClass(HiveIgnoreKeyTextOutputFormat.class);
tbl.setInputFormatClass(SequenceFileInputFormat.class);

代码示例来源:origin: apache/hive

private Table createTestTable() throws HiveException, AlreadyExistsException {
 Database db = new Database();
 db.setName(dbName);
 hive.createDatabase(db, true);
 Table table = new Table(dbName, tableName);
 table.setDbName(dbName);
 table.setInputFormatClass(TextInputFormat.class);
 table.setOutputFormatClass(HiveIgnoreKeyTextOutputFormat.class);
 table.setPartCols(partCols);
 hive.createTable(table);
 table = hive.getTable(dbName, tableName);
 Assert.assertTrue(table.getTTable().isSetId());
 table.getTTable().unsetId();
 for (Map<String, String> partSpec : parts) {
  hive.createPartition(table, partSpec);
 }
 return table;
}

代码示例来源:origin: apache/hive

oldview.setOutputFormatClass(crtView.getOutputFormat());

代码示例来源:origin: apache/drill

oldview.setOutputFormatClass(crtView.getOutputFormat());
tbl.setOutputFormatClass(crtView.getOutputFormat());

相关文章

微信公众号

最新文章

更多

Table类方法