本文整理了Java中org.apache.hadoop.hive.metastore.api.Table.toString()
方法的一些代码示例,展示了Table.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.toString()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.metastore.api.Table
类名称:Table
方法名:toString
暂无
代码示例来源:origin: apache/drill
outStream.write(tbl.getTTable().toString().getBytes("UTF-8"));
outStream.write(separator);
outStream.write(terminator);
代码示例来源:origin: apache/hive
LOG.info("Exporting the metadata of table " + tbl.toString() + " to path "
+ metaPath.toString());
try {
代码示例来源:origin: apache/hive
String tableDesc = HiveStringUtils.escapeJava(tbl.getTTable().toString());
outStream.write(tableDesc.getBytes("UTF-8"));
outStream.write(separator);
代码示例来源:origin: apache/drill
LOG.info("Exporting the metadata of table " + tbl.toString() + " to path "
+ metaPath.toString());
try {
代码示例来源:origin: apache/hive
@Override
public void create_table_with_environment_context(final Table tbl,
final EnvironmentContext envContext)
throws AlreadyExistsException, MetaException, InvalidObjectException,
InvalidInputException {
startFunction("create_table", ": " + tbl.toString());
boolean success = false;
Exception ex = null;
try {
create_table_core(getMS(), tbl, envContext);
success = true;
} catch (NoSuchObjectException e) {
LOG.warn("create_table_with_environment_context got ", e);
ex = e;
throw new InvalidObjectException(e.getMessage());
} catch (MetaException | InvalidObjectException | AlreadyExistsException | InvalidInputException e) {
ex = e;
throw e;
} catch (Exception e) {
ex = e;
throw newMetaException(e);
} finally {
endFunction("create_table", success, ex, tbl.getTableName());
}
}
代码示例来源:origin: apache/hive
@Override
public void create_table_with_constraints(final Table tbl,
final List<SQLPrimaryKey> primaryKeys, final List<SQLForeignKey> foreignKeys,
List<SQLUniqueConstraint> uniqueConstraints,
List<SQLNotNullConstraint> notNullConstraints,
List<SQLDefaultConstraint> defaultConstraints,
List<SQLCheckConstraint> checkConstraints)
throws AlreadyExistsException, MetaException, InvalidObjectException,
InvalidInputException {
startFunction("create_table", ": " + tbl.toString());
boolean success = false;
Exception ex = null;
try {
create_table_core(getMS(), tbl, null, primaryKeys, foreignKeys,
uniqueConstraints, notNullConstraints, defaultConstraints, checkConstraints);
success = true;
} catch (NoSuchObjectException e) {
ex = e;
throw new InvalidObjectException(e.getMessage());
} catch (MetaException | InvalidObjectException | AlreadyExistsException |
InvalidInputException e) {
ex = e;
throw e;
} catch (Exception e) {
ex = e;
throw newMetaException(e);
} finally {
endFunction("create_table", success, ex, tbl.getTableName());
}
}
代码示例来源:origin: apache/hive
runStatementOnDriver(String.format("import table %s from '%s'", importName, exportPath));
org.apache.hadoop.hive.metastore.api.Table imported = msClient.getTable("default", importName);
Assert.assertEquals(imported.toString(), "insert_only",
imported.getParameters().get("transactional_properties"));
Path importPath = new Path(imported.getSd().getLocation());
runStatementOnDriver(String.format("import table %s from '%s'", importName, exportPath));
imported = msClient.getTable("default", importName);
Assert.assertNull(imported.toString(), imported.getParameters().get("transactional"));
Assert.assertNull(imported.toString(),
imported.getParameters().get("transactional_properties"));
importPath = new Path(imported.getSd().getLocation());
代码示例来源:origin: com.facebook.presto.hive/hive-apache
outStream.write(tbl.getTTable().toString().getBytes("UTF-8"));
outStream.write(separator);
outStream.write(terminator);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
LOG.info("Exporting the metadata of table " + tbl.toString() + " to path "
+ metaPath.toString());
try {
代码示例来源:origin: org.apache.hadoop.hive/hive-exec
outStream.writeBytes(tbl.getTTable().toString());
outStream.write(separator);
outStream.write(terminator);
代码示例来源:origin: org.apache.hive/hive-standalone-metastore
@Override
public void create_table_with_environment_context(final Table tbl,
final EnvironmentContext envContext)
throws AlreadyExistsException, MetaException, InvalidObjectException {
startFunction("create_table", ": " + tbl.toString());
boolean success = false;
Exception ex = null;
try {
create_table_core(getMS(), tbl, envContext);
success = true;
} catch (NoSuchObjectException e) {
LOG.warn("create_table_with_environment_context got ", e);
ex = e;
throw new InvalidObjectException(e.getMessage());
} catch (Exception e) {
ex = e;
if (e instanceof MetaException) {
throw (MetaException) e;
} else if (e instanceof InvalidObjectException) {
throw (InvalidObjectException) e;
} else if (e instanceof AlreadyExistsException) {
throw (AlreadyExistsException) e;
} else {
throw newMetaException(e);
}
} finally {
endFunction("create_table", success, ex, tbl.getTableName());
}
}
代码示例来源:origin: edu.berkeley.cs.shark/hive-metastore
@Override
public Index add_index(final Index newIndex, final Table indexTable)
throws InvalidObjectException, AlreadyExistsException, MetaException, TException {
startFunction("add_index", ": " + newIndex.toString() + " " + indexTable.toString());
Index ret = null;
Exception ex = null;
try {
ret = add_index_core(getMS(), newIndex, indexTable);
} catch (Exception e) {
ex = e;
if (e instanceof InvalidObjectException) {
throw (InvalidObjectException) e;
} else if (e instanceof AlreadyExistsException) {
throw (AlreadyExistsException) e;
} else if (e instanceof MetaException) {
throw (MetaException) e;
} else if (e instanceof TException) {
throw (TException) e;
} else {
MetaException me = new MetaException(e.toString());
me.initCause(e);
throw me;
}
} finally {
String tableName = indexTable != null ? indexTable.getTableName() : null;
endFunction("add_index", ret != null, ex, tableName);
}
return ret;
}
代码示例来源:origin: edu.berkeley.cs.shark/hive-metastore
@Override
public void create_table_with_environment_context(final Table tbl,
final EnvironmentContext envContext)
throws AlreadyExistsException, MetaException, InvalidObjectException {
startFunction("create_table", ": " + tbl.toString());
boolean success = false;
Exception ex = null;
try {
create_table_core(getMS(), tbl, envContext);
success = true;
} catch (NoSuchObjectException e) {
ex = e;
throw new InvalidObjectException(e.getMessage());
} catch (Exception e) {
ex = e;
if (e instanceof MetaException) {
throw (MetaException) e;
} else if (e instanceof InvalidObjectException) {
throw (InvalidObjectException) e;
} else if (e instanceof AlreadyExistsException) {
throw (AlreadyExistsException) e;
} else {
MetaException me = new MetaException(e.toString());
me.initCause(e);
throw me;
}
} finally {
endFunction("create_table", success, ex, tbl.getTableName());
}
}
代码示例来源:origin: org.spark-project.hive/hive-metastore
@Override
public Index add_index(final Index newIndex, final Table indexTable)
throws InvalidObjectException, AlreadyExistsException, MetaException, TException {
startFunction("add_index", ": " + newIndex.toString() + " " + indexTable.toString());
Index ret = null;
Exception ex = null;
try {
ret = add_index_core(getMS(), newIndex, indexTable);
} catch (Exception e) {
ex = e;
if (e instanceof InvalidObjectException) {
throw (InvalidObjectException) e;
} else if (e instanceof AlreadyExistsException) {
throw (AlreadyExistsException) e;
} else if (e instanceof MetaException) {
throw (MetaException) e;
} else if (e instanceof TException) {
throw (TException) e;
} else {
throw newMetaException(e);
}
} finally {
String tableName = indexTable != null ? indexTable.getTableName() : null;
endFunction("add_index", ret != null, ex, tableName);
}
return ret;
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
@Override
public Index add_index(final Index newIndex, final Table indexTable)
throws InvalidObjectException, AlreadyExistsException, MetaException, TException {
startFunction("add_index", ": " + newIndex.toString() + " " + indexTable.toString());
Index ret = null;
Exception ex = null;
try {
ret = add_index_core(getMS(), newIndex, indexTable);
} catch (Exception e) {
ex = e;
if (e instanceof InvalidObjectException) {
throw (InvalidObjectException) e;
} else if (e instanceof AlreadyExistsException) {
throw (AlreadyExistsException) e;
} else if (e instanceof MetaException) {
throw (MetaException) e;
} else if (e instanceof TException) {
throw (TException) e;
} else {
throw newMetaException(e);
}
} finally {
String tableName = indexTable != null ? indexTable.getTableName() : null;
endFunction("add_index", ret != null, ex, tableName);
}
return ret;
}
代码示例来源:origin: org.spark-project.hive/hive-metastore
@Override
public void create_table_with_environment_context(final Table tbl,
final EnvironmentContext envContext)
throws AlreadyExistsException, MetaException, InvalidObjectException {
startFunction("create_table", ": " + tbl.toString());
boolean success = false;
Exception ex = null;
try {
create_table_core(getMS(), tbl, envContext);
success = true;
} catch (NoSuchObjectException e) {
ex = e;
throw new InvalidObjectException(e.getMessage());
} catch (Exception e) {
ex = e;
if (e instanceof MetaException) {
throw (MetaException) e;
} else if (e instanceof InvalidObjectException) {
throw (InvalidObjectException) e;
} else if (e instanceof AlreadyExistsException) {
throw (AlreadyExistsException) e;
} else {
throw newMetaException(e);
}
} finally {
endFunction("create_table", success, ex, tbl.getTableName());
}
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
@Override
public void create_table_with_environment_context(final Table tbl,
final EnvironmentContext envContext)
throws AlreadyExistsException, MetaException, InvalidObjectException {
startFunction("create_table", ": " + tbl.toString());
boolean success = false;
Exception ex = null;
try {
create_table_core(getMS(), tbl, envContext);
success = true;
} catch (NoSuchObjectException e) {
ex = e;
throw new InvalidObjectException(e.getMessage());
} catch (Exception e) {
ex = e;
if (e instanceof MetaException) {
throw (MetaException) e;
} else if (e instanceof InvalidObjectException) {
throw (InvalidObjectException) e;
} else if (e instanceof AlreadyExistsException) {
throw (AlreadyExistsException) e;
} else {
throw newMetaException(e);
}
} finally {
endFunction("create_table", success, ex, tbl.getTableName());
}
}
代码示例来源:origin: org.apache.hive/hive-standalone-metastore
List<SQLCheckConstraint> checkConstraints)
throws AlreadyExistsException, MetaException, InvalidObjectException {
startFunction("create_table", ": " + tbl.toString());
boolean success = false;
Exception ex = null;
内容来源于网络,如有侵权,请联系作者删除!