本文整理了Java中org.apache.hadoop.hive.ql.metadata.Table.setOwner()
方法的一些代码示例,展示了Table.setOwner()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setOwner()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Table
类名称:Table
方法名:setOwner
暂无
代码示例来源:origin: apache/incubator-gobblin
private Table getTargetTable(Table originTable, Path targetLocation) throws IOException {
try {
Table targetTable = originTable.copy();
targetTable.setDbName(this.targetDatabase);
targetTable.setDataLocation(targetLocation);
/*
* Need to set the table owner as the flow executor
*/
targetTable.setOwner(UserGroupInformation.getCurrentUser().getShortUserName());
targetTable.getTTable().putToParameters(HiveDataset.REGISTERER, GOBBLIN_DISTCP);
targetTable.getTTable().putToParameters(HiveDataset.REGISTRATION_GENERATION_TIME_MILLIS,
Long.toString(this.startTime));
targetTable.getTTable().unsetCreateTime();
HiveAvroCopyEntityHelper.updateTableAttributesIfAvro(targetTable, this);
return targetTable;
} catch (HiveException he) {
throw new IOException(he);
}
}
代码示例来源:origin: apache/hive
} else if (alterTbl.getOp() == AlterTableDesc.AlterTableTypes.OWNER) {
if (alterTbl.getOwnerPrincipal() != null) {
tbl.setOwner(alterTbl.getOwnerPrincipal().getName());
tbl.setOwnerType(alterTbl.getOwnerPrincipal().getType());
代码示例来源:origin: apache/hive
tbl.setOwner(SessionState.getUserFromAuthenticator());
代码示例来源:origin: apache/drill
tbl.setOwner(SessionState.getUserFromAuthenticator());
代码示例来源:origin: apache/hive
tbl.setOwner("pchakka");
tbl.setRetention(10);
代码示例来源:origin: org.apache.hadoop.hive/hive-exec
private int setGenericTableAttributes(Table tbl) {
try {
tbl.setOwner(conf.getUser());
} catch (IOException e) {
console.printError("Unable to get current user: " + e.getMessage(),
stringifyException(e));
return 1;
}
// set create time
tbl.setCreateTime((int) (System.currentTimeMillis() / 1000));
return 0;
}
代码示例来源:origin: com.linkedin.gobblin/gobblin-data-management
private Table getTargetTable(Table originTable, Path targetLocation) throws IOException {
try {
Table targetTable = originTable.copy();
targetTable.setDbName(this.targetDatabase);
targetTable.setDataLocation(targetLocation);
/*
* Need to set the table owner as the flow executor
*/
targetTable.setOwner(UserGroupInformation.getCurrentUser().getShortUserName());
targetTable.getTTable().putToParameters(HiveDataset.REGISTERER, GOBBLIN_DISTCP);
targetTable.getTTable().putToParameters(HiveDataset.REGISTRATION_GENERATION_TIME_MILLIS,
Long.toString(this.startTime));
targetTable.getTTable().unsetCreateTime();
HiveAvroCopyEntityHelper.updateTableAttributesIfAvro(targetTable, this);
return targetTable;
} catch (HiveException he) {
throw new IOException(he);
}
}
代码示例来源:origin: org.apache.gobblin/gobblin-data-management
private Table getTargetTable(Table originTable, Path targetLocation) throws IOException {
try {
Table targetTable = originTable.copy();
targetTable.setDbName(this.targetDatabase);
targetTable.setDataLocation(targetLocation);
/*
* Need to set the table owner as the flow executor
*/
targetTable.setOwner(UserGroupInformation.getCurrentUser().getShortUserName());
targetTable.getTTable().putToParameters(HiveDataset.REGISTERER, GOBBLIN_DISTCP);
targetTable.getTTable().putToParameters(HiveDataset.REGISTRATION_GENERATION_TIME_MILLIS,
Long.toString(this.startTime));
targetTable.getTTable().unsetCreateTime();
HiveAvroCopyEntityHelper.updateTableAttributesIfAvro(targetTable, this);
return targetTable;
} catch (HiveException he) {
throw new IOException(he);
}
}
代码示例来源:origin: airbnb/reair
"test_output_table");
outputTable.setCreateTime(0);
outputTable.setOwner("table.owner");
代码示例来源:origin: com.facebook.presto.hive/hive-apache
tbl.setOwner(SessionState.getUserFromAuthenticator());
内容来源于网络,如有侵权,请联系作者删除!