|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.Keying
public class Keying
Utility creating hbase friendly keys. Use fabricating row names or column qualifiers.
TODO: Add createSchemeless key, a key that doesn't care if scheme is http or https.
Bytes.split(byte[], byte[], int)
Constructor Summary | |
---|---|
Keying()
|
Method Summary | |
---|---|
static String |
createKey(String u)
Makes a key out of passed URI for use as row name or column qualifier. |
static String |
keyToUri(String s)
Reverse the createKey(String) transform. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Keying()
Method Detail |
---|
public static String createKey(String u)
host
portion of
the URI authority is reversed so subdomains sort under their parent
domain. The returned String is an opaque URI of an artificial
r:
scheme to prevent the result being considered an URI of
the original scheme. Here is an example of the transform: The url
http://lucene.apache.org/index.html?query=something#middle is
returned as
r:http://org.apache.lucene/index.html?query=something#middle
The transforms are reversible. No transform is done if passed URI is
not hierarchical.
If authority userinfo
is present, will mess up the sort
(until we do more work).
- Parameters:
u
- URL to transform.
- Returns:
- An opaque URI of artificial 'r' scheme with host portion of URI
authority reversed (if present).
- See Also:
keyToUri(String)
,
RFC2396
public static String keyToUri(String s)
createKey(String)
transform.
s
- URI
made by createKey(String)
.
createKey(String)
transform.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |