本文整理了Java中org.apache.hadoop.hive.ql.metadata.Table.getInputFormatClass()
方法的一些代码示例,展示了Table.getInputFormatClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getInputFormatClass()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Table
类名称:Table
方法名:getInputFormatClass
暂无
代码示例来源:origin: apache/hive
@Override
public Class<? extends InputFormat> getInputFormatClass() {
return table.getInputFormatClass();
}
代码示例来源:origin: apache/hive
public static TableDesc getTableDesc(Table tbl) {
Properties props = tbl.getMetadata();
props.put(serdeConstants.SERIALIZATION_LIB, tbl.getDeserializer().getClass().getName());
return (new TableDesc(tbl.getInputFormatClass(), tbl
.getOutputFormatClass(), props));
}
代码示例来源:origin: apache/drill
public static TableDesc getTableDesc(Table tbl) {
Properties props = tbl.getMetadata();
props.put(serdeConstants.SERIALIZATION_LIB, tbl.getDeserializer().getClass().getName());
return (new TableDesc(tbl.getInputFormatClass(), tbl
.getOutputFormatClass(), props));
}
代码示例来源:origin: apache/hive
final public Class<? extends InputFormat> getInputFormatClass()
throws HiveException {
if (inputFormatClass == null) {
// sd can be null for views
String clsName = tPartition.getSd() == null ? null : tPartition.getSd().getInputFormat();
if (clsName == null) {
return inputFormatClass = table.getInputFormatClass();
}
try {
inputFormatClass = ((Class<? extends InputFormat>) Class.forName(clsName, true,
Utilities.getSessionSpecifiedClassLoader()));
} catch (ClassNotFoundException e) {
throw new HiveException("Class not found: " + clsName, e);
}
}
return inputFormatClass;
}
代码示例来源:origin: apache/drill
final public Class<? extends InputFormat> getInputFormatClass()
throws HiveException {
if (inputFormatClass == null) {
// sd can be null for views
String clsName = tPartition.getSd() == null ? null : tPartition.getSd().getInputFormat();
if (clsName == null) {
return inputFormatClass = table.getInputFormatClass();
}
try {
inputFormatClass = ((Class<? extends InputFormat>) Class.forName(clsName, true,
Utilities.getSessionSpecifiedClassLoader()));
} catch (ClassNotFoundException e) {
throw new HiveException("Class not found: " + clsName, e);
}
}
return inputFormatClass;
}
代码示例来源:origin: apache/hive
tblLoc = tbl.getDataLocation().toString();
inputFormattCls = tbl.getInputFormatClass() == null ? null : tbl.getInputFormatClass().getName();
outputFormattCls = tbl.getOutputFormatClass() == null ? null : tbl.getOutputFormatClass().getName();
代码示例来源:origin: apache/hive
private void ensureFileFormatsMatch(TableSpec ts, List<FileStatus> fileStatuses,
final URI fromURI)
throws SemanticException {
final Class<? extends InputFormat> destInputFormat;
try {
if (ts.getPartSpec() == null || ts.getPartSpec().isEmpty()) {
destInputFormat = ts.tableHandle.getInputFormatClass();
} else {
destInputFormat = ts.partHandle.getInputFormatClass();
}
} catch (HiveException e) {
throw new SemanticException(e);
}
try {
FileSystem fs = FileSystem.get(fromURI, conf);
boolean validFormat = HiveFileFormatUtils.checkInputFormat(fs, conf, destInputFormat,
fileStatuses);
if (!validFormat) {
throw new SemanticException(ErrorMsg.INVALID_FILE_FORMAT_IN_LOAD.getMsg());
}
} catch (Exception e) {
throw new SemanticException("Unable to load data to destination table." +
" Error: " + e.getMessage());
}
}
代码示例来源:origin: apache/hive
long len = getPathLength(jobConf, table.getPath(), table.getInputFormatClass(), threshold);
if (LOG.isDebugEnabled()) {
LOG.debug("Threshold " + len + " exceeded for pseudoMR mode");
代码示例来源:origin: apache/drill
private void ensureFileFormatsMatch(TableSpec ts, List<FileStatus> fileStatuses,
final URI fromURI)
throws SemanticException {
final Class<? extends InputFormat> destInputFormat;
try {
if (ts.getPartSpec() == null || ts.getPartSpec().isEmpty()) {
destInputFormat = ts.tableHandle.getInputFormatClass();
} else {
destInputFormat = ts.partHandle.getInputFormatClass();
}
} catch (HiveException e) {
throw new SemanticException(e);
}
try {
FileSystem fs = FileSystem.get(fromURI, conf);
boolean validFormat = HiveFileFormatUtils.checkInputFormat(fs, conf, destInputFormat,
fileStatuses);
if (!validFormat) {
throw new SemanticException(ErrorMsg.INVALID_FILE_FORMAT_IN_LOAD.getMsg());
}
} catch (Exception e) {
throw new SemanticException("Unable to load data to destination table." +
" Error: " + e.getMessage());
}
}
}
代码示例来源:origin: apache/hive
tblLoc = tbl.getDataLocation().toString();
inputFormattCls = tbl.getInputFormatClass() == null ? null : tbl.getInputFormatClass().getName();
outputFormattCls = tbl.getOutputFormatClass() == null ? null : tbl.getOutputFormatClass().getName();
代码示例来源:origin: apache/hive
private Task<?> genTableStats(ParseContext parseContext, TableScanOperator tableScan, Task currentTask, final HashSet<WriteEntity> outputs)
throws HiveException {
Class<? extends InputFormat> inputFormat = tableScan.getConf().getTableMetadata()
.getInputFormatClass();
Table table = tableScan.getConf().getTableMetadata();
List<Partition> partitions = new ArrayList<>();
代码示例来源:origin: apache/hive
Class<? extends InputFormat> inputFormat = table.getInputFormatClass();
代码示例来源:origin: apache/drill
tblLoc = tbl.getDataLocation().toString();
inputFormattCls = tbl.getInputFormatClass().getName();
outputFormattCls = tbl.getOutputFormatClass().getName();
代码示例来源:origin: apache/hive
Class<? extends InputFormat> inputFormat = table.getInputFormatClass();
代码示例来源:origin: apache/hive
throw new HiveException("must specify a non-null serDe");
if (null == getInputFormatClass()) {
throw new HiveException("must specify an InputFormat class");
代码示例来源:origin: apache/drill
private Task<?> genTableStats(GenTezProcContext context, TableScanOperator tableScan)
throws HiveException {
Class<? extends InputFormat> inputFormat = tableScan.getConf().getTableMetadata()
.getInputFormatClass();
ParseContext parseContext = context.parseContext;
Table table = tableScan.getConf().getTableMetadata();
代码示例来源:origin: apache/hive
Class<? extends InputFormat> inputFormat = table.getInputFormatClass();
Map<Operator<? extends OperatorDesc>, GenMapRedCtx> mapCurrCtx = ctx.getMapCurrCtx();
代码示例来源:origin: apache/drill
throw new HiveException("must specify a non-null serDe");
if (null == getInputFormatClass()) {
throw new HiveException("must specify an InputFormat class");
代码示例来源:origin: apache/drill
.getInputFormatClass();
代码示例来源:origin: apache/hive
tbl.setOutputFormatClass(getOutputFormat());
if (getInputFormat() != null && !getInputFormat().isEmpty()) {
tbl.getSd().setInputFormat(tbl.getInputFormatClass().getName());
内容来源于网络,如有侵权,请联系作者删除!