HADOOP-12065 Using more meaningful keys in EC schema. Contributed by Kai Zheng

This commit is contained in:
Kai Zheng 2015-06-08 20:24:17 +08:00
parent 2eee19cd1d
commit c41b02cc00
3 changed files with 9 additions and 7 deletions

View File

@ -65,3 +65,5 @@
HADOOP-12011. Allow to dump verbose information to ease debugging in raw erasure coders HADOOP-12011. Allow to dump verbose information to ease debugging in raw erasure coders
(Kai Zheng) (Kai Zheng)
HADOOP-12065. Using more meaningful keys in EC schema. (Kai Zheng)

View File

@ -25,8 +25,8 @@
* Erasure coding schema to housekeeper relevant information. * Erasure coding schema to housekeeper relevant information.
*/ */
public final class ECSchema { public final class ECSchema {
public static final String NUM_DATA_UNITS_KEY = "k"; public static final String NUM_DATA_UNITS_KEY = "numDataUnits";
public static final String NUM_PARITY_UNITS_KEY = "m"; public static final String NUM_PARITY_UNITS_KEY = "numParityUnits";
public static final String CODEC_NAME_KEY = "codec"; public static final String CODEC_NAME_KEY = "codec";
/** /**

View File

@ -40,13 +40,13 @@ public void testLoadSchema() throws Exception {
out.println("<?xml version=\"1.0\"?>"); out.println("<?xml version=\"1.0\"?>");
out.println("<schemas>"); out.println("<schemas>");
out.println(" <schema name=\"RSk6m3\">"); out.println(" <schema name=\"RSk6m3\">");
out.println(" <k>6</k>"); out.println(" <numDataUnits>6</numDataUnits>");
out.println(" <m>3</m>"); out.println(" <numParityUnits>3</numParityUnits>");
out.println(" <codec>RS</codec>"); out.println(" <codec>RS</codec>");
out.println(" </schema>"); out.println(" </schema>");
out.println(" <schema name=\"RSk10m4\">"); out.println(" <schema name=\"RSk10m4\">");
out.println(" <k>10</k>"); out.println(" <numDataUnits>10</numDataUnits>");
out.println(" <m>4</m>"); out.println(" <numParityUnits>4</numParityUnits>");
out.println(" <codec>RS</codec>"); out.println(" <codec>RS</codec>");
out.println(" </schema>"); out.println(" </schema>");
out.println("</schemas>"); out.println("</schemas>");