MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / checkTable

Method checkTable

src/KeyValue.java:339–346  ·  view source on GitHub ↗

Validates a table name. @throws IllegalArgumentException if the table name is too big or malformed. @throws NullPointerException if the table name is null.

(final byte[] table)

Source from the content-addressed store, hash-verified

337 * @throws NullPointerException if the table name is {@code null}.
338 */
339 static void checkTable(final byte[] table) {
340 if (table.length > Byte.MAX_VALUE) {
341 throw new IllegalArgumentException("Table name too long: "
342 + table.length + " bytes long " + Bytes.pretty(table));
343 } else if (table.length == 0) {
344 throw new IllegalArgumentException("empty table name");
345 }
346 }
347
348 /**
349 * Validates a row key.

Callers 2

HBaseRpcMethod · 0.95
ScannerMethod · 0.95

Calls 1

prettyMethod · 0.95

Tested by

no test coverage detected