public class DataTransferFactory extends Object
HCatReader or HCatWriter
at master and slave nodes.| Constructor and Description |
|---|
DataTransferFactory() |
| Modifier and Type | Method and Description |
|---|---|
static HCatReader |
getHCatReader(ReadEntity re,
Map<String,String> config)
This should be called once from master node to obtain an instance of
HCatReader. |
static HCatReader |
getHCatReader(ReaderContext context,
int slaveNumber)
This should only be called once from every slave node to obtain an instance
of
HCatReader. |
static HCatReader |
getHCatReader(ReaderContext context,
int slaveNumber,
StateProvider sp)
This should only be called once from every slave node to obtain an instance
of
HCatReader. |
static HCatWriter |
getHCatWriter(WriteEntity we,
Map<String,String> config)
This should be called at master node to obtain an instance of
HCatWriter. |
static HCatWriter |
getHCatWriter(WriterContext cntxt)
This should be called at slave nodes to obtain an instance of
HCatWriter. |
static HCatWriter |
getHCatWriter(WriterContext cntxt,
StateProvider sp)
This should be called at slave nodes to obtain an instance of
HCatWriter. |
public static HCatReader getHCatReader(ReadEntity re, Map<String,String> config)
HCatReader.re - ReadEntity built using ReadEntity.Builderconfig - any configuration which master node wants to pass to HCatalogHCatReaderpublic static HCatReader getHCatReader(ReaderContext context, int slaveNumber)
HCatReader.context - reader context obtained at the master nodeslaveNumber - which slave this is, determines which part of the read is doneHCatReaderpublic static HCatReader getHCatReader(ReaderContext context, int slaveNumber, StateProvider sp)
HCatReader. This should be called if an external system has some
state to provide to HCatalog.context - reader context obtained at the master nodeslaveNumber - which slave this is, determines which part of the read is donesp - StateProviderHCatReaderpublic static HCatWriter getHCatWriter(WriteEntity we, Map<String,String> config)
HCatWriter.we - WriteEntity built using WriteEntity.Builderconfig - any configuration which master wants to pass to HCatalogHCatWriterpublic static HCatWriter getHCatWriter(WriterContext cntxt)
HCatWriter.cntxt - WriterContext obtained at master nodeHCatWriterpublic static HCatWriter getHCatWriter(WriterContext cntxt, StateProvider sp)
HCatWriter. If an external system has some mechanism for providing
state to HCatalog, this constructor can be used.cntxt - WriterContext obtained at master nodesp - StateProviderHCatWriterCopyright © 2019 The Apache Software Foundation. All Rights Reserved.