com.cloudera.api.model
Class ApiHiveReplicationArguments

java.lang.Object
  extended by com.cloudera.api.model.ApiHiveReplicationArguments
Direct Known Subclasses:
ApiHiveCloudReplicationArguments

public class ApiHiveReplicationArguments
extends Object

Replication arguments for Hive services.


Constructor Summary
ApiHiveReplicationArguments()
           
 
Method Summary
 boolean equals(Object o)
           
 String getExportDir()
          Directory, in the HDFS service where the target Hive service's data is stored, where the export file will be saved.
 boolean getForce()
          Whether to force overwriting of mismatched tables.
 ApiHdfsReplicationArguments getHdfsArguments()
          Arguments for the HDFS replication job.
 Integer getNumThreads()
          Number of threads to use in multi-threaded export/import phase
 boolean getReplicateData()
          Whether to replicate table data stored in HDFS.
 Boolean getReplicateImpalaMetadata()
          Whether to replicate the impala metadata.
 Boolean getRunInvalidateMetadata()
          Whether to run invalidate metadata query or not
 ApiServiceRef getSourceService()
          The service to replicate from.
 List<ApiHiveTable> getTableFilters()
          Filters for tables to include in the replication.
 int hashCode()
           
 boolean isDryRun()
          Whether to perform a dry run.
 void setDryRun(boolean dryRun)
           
 void setExportDir(String exportDir)
           
 void setForce(boolean force)
           
 void setHdfsArguments(ApiHdfsReplicationArguments hdfsArguments)
           
 void setNumThreads(Integer numThreads)
           
 void setReplicateData(boolean replicateData)
           
 void setReplicateImpalaMetadata(Boolean replicateImpalaMetadata)
           
 void setRunInvalidateMetadata(Boolean runInvalidateMetadata)
           
 void setSourceService(ApiServiceRef sourceService)
           
 void setTableFilters(List<ApiHiveTable> tableFilters)
           
 String toString()
           
protected  com.google.common.base.Objects.ToStringHelper toStringHelper()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApiHiveReplicationArguments

public ApiHiveReplicationArguments()
Method Detail

getSourceService

public ApiServiceRef getSourceService()
The service to replicate from.


setSourceService

public void setSourceService(ApiServiceRef sourceService)

getTableFilters

public List<ApiHiveTable> getTableFilters()
Filters for tables to include in the replication. Optional. If not provided, include all tables in all databases.


setTableFilters

public void setTableFilters(List<ApiHiveTable> tableFilters)

getExportDir

public String getExportDir()
Directory, in the HDFS service where the target Hive service's data is stored, where the export file will be saved. Optional. If not provided, Cloudera Manager will pick a directory for storing the data.


setExportDir

public void setExportDir(String exportDir)

getForce

public boolean getForce()
Whether to force overwriting of mismatched tables.


setForce

public void setForce(boolean force)

getReplicateData

public boolean getReplicateData()
Whether to replicate table data stored in HDFS.

If set, the "hdfsArguments" property must be set to configure the HDFS replication job.


setReplicateData

public void setReplicateData(boolean replicateData)

getHdfsArguments

public ApiHdfsReplicationArguments getHdfsArguments()
Arguments for the HDFS replication job.

This must be provided when choosing to replicate table data stored in HDFS. The "sourceService", "sourcePath" and "dryRun" properties of the HDFS arguments are ignored; their values are derived from the Hive replication's information.

The "destinationPath" property is used slightly differently from the usual HDFS replication jobs. It is used to map the root path of the source service into the target service. It may be omitted, in which case the source and target paths will match.

Example: if the destination path is set to "/new_root", a "/foo/bar" path in the source will be stored in "/new_root/foo/bar" in the target.


setHdfsArguments

public void setHdfsArguments(ApiHdfsReplicationArguments hdfsArguments)

getReplicateImpalaMetadata

public Boolean getReplicateImpalaMetadata()
Whether to replicate the impala metadata. (i.e. the metadata for impala UDFs and their corresponding binaries in HDFS).


setReplicateImpalaMetadata

public void setReplicateImpalaMetadata(Boolean replicateImpalaMetadata)

getRunInvalidateMetadata

public Boolean getRunInvalidateMetadata()
Whether to run invalidate metadata query or not


setRunInvalidateMetadata

public void setRunInvalidateMetadata(Boolean runInvalidateMetadata)

isDryRun

public boolean isDryRun()
Whether to perform a dry run. Defaults to false.


setDryRun

public void setDryRun(boolean dryRun)

getNumThreads

public Integer getNumThreads()
Number of threads to use in multi-threaded export/import phase


setNumThreads

public void setNumThreads(Integer numThreads)

toStringHelper

protected com.google.common.base.Objects.ToStringHelper toStringHelper()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.