HADOOP-6150. Users should be able to instantiate comparator using TFile
API. (Hong Tang via rangadi) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@797274 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
53c127013c
commit
e4450e5487
@ -891,6 +891,9 @@ Trunk (unreleased changes)
|
|||||||
HADOOP-6132. RPC client create an extra connection because of incorrect
|
HADOOP-6132. RPC client create an extra connection because of incorrect
|
||||||
key for connection cache. (Kan Zhang via rangadi)
|
key for connection cache. (Kan Zhang via rangadi)
|
||||||
|
|
||||||
|
HADOOP-6150. Users should be able to instantiate comparator using TFile
|
||||||
|
API. (Hong Tang via rangadi)
|
||||||
|
|
||||||
Release 0.20.1 - Unreleased
|
Release 0.20.1 - Unreleased
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -161,6 +161,17 @@ static int getFSOutputBufferSize(Configuration conf) {
|
|||||||
/** comparator prefix: java class */
|
/** comparator prefix: java class */
|
||||||
public static final String COMPARATOR_JCLASS = "jclass:";
|
public static final String COMPARATOR_JCLASS = "jclass:";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make a raw comparator from a string name.
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* Comparator name
|
||||||
|
* @return A RawComparable comparator.
|
||||||
|
*/
|
||||||
|
static public Comparator<RawComparable> makeComparator(String name) {
|
||||||
|
return TFileMeta.makeComparator(name);
|
||||||
|
}
|
||||||
|
|
||||||
// Prevent the instantiation of TFiles
|
// Prevent the instantiation of TFiles
|
||||||
private TFile() {
|
private TFile() {
|
||||||
// nothing
|
// nothing
|
||||||
@ -1947,7 +1958,7 @@ public TFileMeta(DataInput in) throws IOException {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private static BytesComparator makeComparator(String comparator) {
|
static BytesComparator makeComparator(String comparator) {
|
||||||
if (comparator.length() == 0) {
|
if (comparator.length() == 0) {
|
||||||
// unsorted keys
|
// unsorted keys
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user