Search in sources :

Example 1 with CmRecycleRequest

use of org.apache.hadoop.hive.metastore.api.CmRecycleRequest in project hive by apache.

the class Hive method recycleDirToCmPath.

/**
 * Recycles the files recursively from the input path to the cmroot directory either by copying or moving it.
 *
 * @param dataPath Path of the data files to be recycled to cmroot
 * @param isPurge
 *          When set to true files which needs to be recycled are not moved to Trash
 */
public void recycleDirToCmPath(Path dataPath, boolean isPurge) throws HiveException {
    try {
        CmRecycleRequest request = new CmRecycleRequest(dataPath.toString(), isPurge);
        getSynchronizedMSC().recycleDirToCmPath(request);
    } catch (Exception e) {
        throw new HiveException(e);
    }
}
Also used : CmRecycleRequest(org.apache.hadoop.hive.metastore.api.CmRecycleRequest) AlreadyExistsException(org.apache.hadoop.hive.metastore.api.AlreadyExistsException) LockException(org.apache.hadoop.hive.ql.lockmgr.LockException) InvalidOperationException(org.apache.hadoop.hive.metastore.api.InvalidOperationException) IOException(java.io.IOException) UnknownHostException(java.net.UnknownHostException) ExecutionException(java.util.concurrent.ExecutionException) NoSuchObjectException(org.apache.hadoop.hive.metastore.api.NoSuchObjectException) MetaException(org.apache.hadoop.hive.metastore.api.MetaException) HiveMetaException(org.apache.hadoop.hive.metastore.HiveMetaException) SemanticException(org.apache.hadoop.hive.ql.parse.SemanticException) TApplicationException(org.apache.thrift.TApplicationException) TException(org.apache.thrift.TException) SerDeException(org.apache.hadoop.hive.serde2.SerDeException) FileNotFoundException(java.io.FileNotFoundException) JDODataStoreException(javax.jdo.JDODataStoreException)

Aggregations

FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 UnknownHostException (java.net.UnknownHostException)1 ExecutionException (java.util.concurrent.ExecutionException)1 JDODataStoreException (javax.jdo.JDODataStoreException)1 HiveMetaException (org.apache.hadoop.hive.metastore.HiveMetaException)1 AlreadyExistsException (org.apache.hadoop.hive.metastore.api.AlreadyExistsException)1 CmRecycleRequest (org.apache.hadoop.hive.metastore.api.CmRecycleRequest)1 InvalidOperationException (org.apache.hadoop.hive.metastore.api.InvalidOperationException)1 MetaException (org.apache.hadoop.hive.metastore.api.MetaException)1 NoSuchObjectException (org.apache.hadoop.hive.metastore.api.NoSuchObjectException)1 LockException (org.apache.hadoop.hive.ql.lockmgr.LockException)1 SemanticException (org.apache.hadoop.hive.ql.parse.SemanticException)1 SerDeException (org.apache.hadoop.hive.serde2.SerDeException)1 TApplicationException (org.apache.thrift.TApplicationException)1 TException (org.apache.thrift.TException)1