Constructor and Description |
---|
HiveShimV2() |
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.
|
public org.apache.hadoop.hive.metastore.IMetaStoreClient getHiveMetastoreClient(org.apache.hadoop.hive.conf.HiveConf hiveConf)
HiveShim
getHiveMetastoreClient
in interface HiveShim
hiveConf
- HiveConf instancepublic List<String> getViews(org.apache.hadoop.hive.metastore.IMetaStoreClient client, String databaseName) throws org.apache.hadoop.hive.metastore.api.UnknownDBException, org.apache.thrift.TException
HiveShim
getViews
in interface HiveShim
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 Thriftpublic boolean moveToTrash(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, Configuration conf, boolean purge) throws IOException
HiveShim
This interface is here because FileUtils.moveToTrash in different Hive versions have different signatures.
moveToTrash
in interface HiveShim
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 deletedpublic void 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
HiveShim
alterTable
in interface HiveShim
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
public org.apache.hadoop.hive.ql.udf.generic.SimpleGenericUDAFParameterInfo createUDAFParameterInfo(org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector[] params, boolean isWindowing, boolean distinct, boolean allColumns)
HiveShim
createUDAFParameterInfo
in interface HiveShim
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.