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.Builder
config
- any configuration which master node wants to pass to HCatalogHCatReader
public 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 doneHCatReader
public 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
- StateProvider
HCatReader
public static HCatWriter getHCatWriter(WriteEntity we, Map<String,String> config)
HCatWriter
.we
- WriteEntity built using WriteEntity.Builder
config
- any configuration which master wants to pass to HCatalogHCatWriter
public static HCatWriter getHCatWriter(WriterContext cntxt)
HCatWriter
.cntxt
- WriterContext
obtained at master nodeHCatWriter
public 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
- StateProvider
HCatWriter
Copyright © 2017 The Apache Software Foundation. All rights reserved.