public interface HiveShim
Modifier and Type | Method and Description |
---|---|
void |
alterTable(org.apache.hadoop.hive.metastore.IMetaStoreClient client,
String databaseName,
String tableName,
org.apache.hadoop.hive.metastore.api.Table table)
Alters a Hive table.
|
org.apache.hadoop.hive.ql.udf.generic.SimpleGenericUDAFParameterInfo |
createUDAFParameterInfo(org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector[] params,
boolean isWindowing,
boolean distinct,
boolean allColumns)
Creates SimpleGenericUDAFParameterInfo.
|
org.apache.hadoop.hive.metastore.IMetaStoreClient |
getHiveMetastoreClient(org.apache.hadoop.hive.conf.HiveConf hiveConf)
Create a Hive Metastore client based on the given HiveConf object.
|
List<String> |
getViews(org.apache.hadoop.hive.metastore.IMetaStoreClient client,
String databaseName)
Get a list of views in the given database from the given Hive Metastore client.
|
boolean |
moveToTrash(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
Configuration conf,
boolean purge)
Moves a particular file or directory to trash.
|
org.apache.hadoop.hive.metastore.IMetaStoreClient getHiveMetastoreClient(org.apache.hadoop.hive.conf.HiveConf hiveConf)
hiveConf
- HiveConf instanceList<String> getViews(org.apache.hadoop.hive.metastore.IMetaStoreClient client, String databaseName) throws org.apache.hadoop.hive.metastore.api.UnknownDBException, org.apache.thrift.TException
client
- Hive Metastore clientdatabaseName
- the name of the databaseorg.apache.hadoop.hive.metastore.api.UnknownDBException
- if the database doesn't existorg.apache.thrift.TException
- for any other generic exceptions caused by Thriftboolean moveToTrash(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, Configuration conf, boolean purge) throws IOException
This interface is here because FileUtils.moveToTrash in different Hive versions have different signatures.
fs
- the FileSystem to usepath
- the path of the file or directory to be moved to trash.conf
- the Configuration to usepurge
- whether try to skip trash and directly delete the file/directory. This flag may be ignored by
old Hive versions prior to 2.3.0.IOException
- if the file/directory cannot be properly moved or deletedvoid alterTable(org.apache.hadoop.hive.metastore.IMetaStoreClient client, String databaseName, String tableName, org.apache.hadoop.hive.metastore.api.Table table) throws org.apache.hadoop.hive.metastore.api.InvalidOperationException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
client
- the Hive metastore clientdatabaseName
- the name of the database to which the table belongstableName
- the name of the table to be alteredtable
- the new Hive tableorg.apache.hadoop.hive.metastore.api.InvalidOperationException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
org.apache.hadoop.hive.ql.udf.generic.SimpleGenericUDAFParameterInfo createUDAFParameterInfo(org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector[] params, boolean isWindowing, boolean distinct, boolean allColumns)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.