本文整理了Java中org.apache.hadoop.hive.ql.metadata.Table.setInputFormatClass()
方法的一些代码示例,展示了Table.setInputFormatClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setInputFormatClass()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Table
类名称:Table
方法名:setInputFormatClass
暂无
代码示例来源:origin: apache/hive
public void setInputFormatClass(String name) throws HiveException {
if (name == null) {
inputFormatClass = null;
tTable.getSd().setInputFormat(null);
return;
}
try {
setInputFormatClass((Class<? extends InputFormat<WritableComparable, Writable>>) Class
.forName(name, true, Utilities.getSessionSpecifiedClassLoader()));
} catch (ClassNotFoundException e) {
throw new HiveException("Class not found: " + name, e);
}
}
代码示例来源:origin: apache/drill
public void setInputFormatClass(String name) throws HiveException {
if (name == null) {
inputFormatClass = null;
tTable.getSd().setInputFormat(null);
return;
}
try {
setInputFormatClass((Class<? extends InputFormat<WritableComparable, Writable>>) Class
.forName(name, true, Utilities.getSessionSpecifiedClassLoader()));
} 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.getTTable().setTemporary(true);
table.setStoredAsSubDirectories(false);
table.setInputFormatClass(format.getInputFormat());
table.setOutputFormatClass(format.getOutputFormat());
db.createTable(table, true);
代码示例来源:origin: apache/hive
tbl.setInputFormatClass(fileInputFormat.getName());
tbl.setOutputFormatClass(fileOutputFormat.getName());
代码示例来源:origin: apache/drill
table.getTTable().setTemporary(true);
table.setStoredAsSubDirectories(false);
table.setInputFormatClass(format.getInputFormat());
table.setOutputFormatClass(format.getOutputFormat());
db.createTable(table, true);
代码示例来源:origin: apache/drill
tbl.setInputFormatClass(fileInputFormat.getName());
tbl.setOutputFormatClass(fileOutputFormat.getName());
代码示例来源:origin: apache/hive
if (inputFormatClassName != null && serDeClassName != null) {
try {
tempTableObj.setInputFormatClass(inputFormatClassName);
tempTableObj.setSerializationLib(serDeClassName);
} catch (HiveException e) {
代码示例来源:origin: apache/hive
table.setInputFormatClass(TextInputFormat.class);
table.setOutputFormatClass(HiveIgnoreKeyTextOutputFormat.class);
代码示例来源:origin: apache/hive
tbl.setInputFormatClass(SequenceFileInputFormat.class.getName());
tbl.setOutputFormatClass(SequenceFileOutputFormat.class.getName());
tbl.setSerializationLib(ThriftDeserializer.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.setInputFormatClass(crtTbl.getDefaultInputFormat());
tbl.setOutputFormatClass(crtTbl.getDefaultOutputFormat());
tbl.setInputFormatClass(crtTbl.getDefaultInputFormat());
tbl.setOutputFormatClass(crtTbl.getDefaultOutputFormat());
tbl.getTTable().getSd().setInputFormat(
代码示例来源:origin: apache/hive
tbl.setInputFormatClass(getInputFormat());
tbl.setInputFormatClass(getInputFormat());
tbl.setOutputFormatClass(getOutputFormat());
if (getInputFormat() != null && !getInputFormat().isEmpty()) {
代码示例来源:origin: apache/hive
table.setInputFormatClass(TextInputFormat.class);
table.setOutputFormatClass(HiveIgnoreKeyTextOutputFormat.class);
代码示例来源:origin: apache/hive
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.setInputFormatClass(crtView.getInputFormat());
代码示例来源:origin: apache/drill
oldview.setInputFormatClass(crtView.getInputFormat());
tbl.setInputFormatClass(crtView.getInputFormat());
内容来源于网络,如有侵权,请联系作者删除!