HADOOP-1856 [Hbaseshell] Jar command using Hadoop RunJar util

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@576239 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2007-09-17 02:57:31 +00:00
parent 20a6c00b5c
commit 4404e14c16
7 changed files with 531 additions and 449 deletions

View File

@ -67,6 +67,8 @@ Trunk (unreleased changes)
(Izaak Rubin via Stack) (Izaak Rubin via Stack)
HADOOP-1868 Make default configuration more responsive HADOOP-1868 Make default configuration more responsive
HADOOP-1884 Remove useless debugging log messages from hbase.mapred HADOOP-1884 Remove useless debugging log messages from hbase.mapred
HADOOP-1856 Add Jar command to hbase shell using Hadoop RunJar util
(Edward Yoon via Stack)
Below are the list of changes before 2007-08-18 Below are the list of changes before 2007-08-18

View File

@ -68,9 +68,10 @@ public class Shell {
} }
} catch (ParseException pe) { } catch (ParseException pe) {
String[] msg = pe.getMessage().split("[\n]"); String[] msg = pe.getMessage().split("[\n]");
System.out.println("Syntax error : Type 'help' for usage: " + msg[0]); System.out.println("Syntax error : Type 'help;' for usage.\nMessage : " + msg[0]);
} catch (TokenMgrError te) { } catch (TokenMgrError te) {
System.out.println("Lexical error : Type 'help' for usage."); String[] msg = te.getMessage().split("[\n]");
System.out.println("Lexical error : Type 'help;' for usage.\nMessage : " + msg[0]);
} }
long end = System.currentTimeMillis(); long end = System.currentTimeMillis();
@ -105,4 +106,4 @@ public class Shell {
"(" + String.format("%.2f", (end - start) * 0.001) + " sec)" : "(" + String.format("%.2f", (end - start) * 0.001) + " sec)" :
""; "";
} }
} }

View File

@ -72,6 +72,7 @@ TOKEN: /** for HQL statements */
| <CREATE: "create"> | <CREATE: "create">
| <DROP: "drop"> | <DROP: "drop">
| <FS: "fs"> | <FS: "fs">
| <JAR: "jar">
| <EXIT: "exit"> | <EXIT: "exit">
| <INSERT: "insert"> | <INSERT: "insert">
| <INTO: "into"> | <INTO: "into">
@ -117,7 +118,7 @@ TOKEN: /** for HQL statements */
TOKEN : /** Literals */ TOKEN : /** Literals */
{ {
<ID: (["A"-"Z","a"-"z","_","-",".",":","/"])+ > <ID: (["A"-"Z","a"-"z","0"-"9","_","-",".",":","/"])+ >
| <INTEGER_LITERAL: (["0"-"9"])+ > | <INTEGER_LITERAL: (["0"-"9"])+ >
| <FLOATING_POINT_LITERAL: | <FLOATING_POINT_LITERAL:
(["0"-"9"])+ "." (["0"-"9"])+ (<EXPONENT>)? (["0"-"9"])+ "." (["0"-"9"])+ (<EXPONENT>)?
@ -164,6 +165,7 @@ Command cmdStatement() :
| cmd = disableCommand() | cmd = disableCommand()
| cmd = clearCommand() | cmd = clearCommand()
| cmd = fsCommand() | cmd = fsCommand()
| cmd = jarCommand()
) )
{ {
return cmd; return cmd;
@ -197,6 +199,25 @@ FsCommand fsCommand() :
} }
} }
JarCommand jarCommand() :
{
Token t = null;
JarCommand jar = new JarCommand();
List<String> query = new ArrayList<String>();
}
{
<JAR>
(
( t = <ID> | t = <INTEGER_LITERAL> )
{ query.add(t.image.toString()); }
)*
{
jar.setQuery(query);
return jar;
}
}
HelpCommand helpCommand() : HelpCommand helpCommand() :
{ {
Token t = null; Token t = null;
@ -218,6 +239,7 @@ HelpCommand helpCommand() :
| t=<ALTER> | t=<ALTER>
| t=<CLEAR> | t=<CLEAR>
| t=<FS> | t=<FS>
| t=<JAR>
| t=<ID> | t=<ID>
) { argument = t.image.toString(); } ) { argument = t.image.toString(); }
] ]

View File

@ -37,9 +37,12 @@ public class HelpContents {
load.put("SHOW", new String[] {"List all available tables", "SHOW TABLES;"}); load.put("SHOW", new String[] {"List all available tables", "SHOW TABLES;"});
load.put("FS", new String[] { "Hadoop FsShell operations.", load.put("FS", new String[] { "Hadoop FsShell operations",
"FS -copyFromLocal /home/user/backup.dat fs/user/backup;" }); "FS -copyFromLocal /home/user/backup.dat fs/user/backup;" });
load.put("JAR", new String[] { "Hadoop RunJar util",
"JAR ./build/hadoop-examples.jar pi 10 10;" });
load.put("CLEAR", new String[] {"Clear the screen", "CLEAR;"} ); load.put("CLEAR", new String[] {"Clear the screen", "CLEAR;"} );
load.put("DESCRIBE", new String[] { "Print information about tables", load.put("DESCRIBE", new String[] { "Print information about tables",

View File

@ -60,13 +60,14 @@ public class Parser implements ParserConstants {
case CREATE: case CREATE:
case DROP: case DROP:
case FS: case FS:
case JAR:
case EXIT: case EXIT:
case INSERT: case INSERT:
case DELETE: case DELETE:
case SELECT: case SELECT:
case ENABLE: case ENABLE:
case DISABLE: case DISABLE:
case 61: case 62:
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case HELP: case HELP:
case ALTER: case ALTER:
@ -77,6 +78,7 @@ public class Parser implements ParserConstants {
case CREATE: case CREATE:
case DROP: case DROP:
case FS: case FS:
case JAR:
case EXIT: case EXIT:
case INSERT: case INSERT:
case DELETE: case DELETE:
@ -89,7 +91,7 @@ public class Parser implements ParserConstants {
jj_la1[0] = jj_gen; jj_la1[0] = jj_gen;
; ;
} }
jj_consume_token(61); jj_consume_token(62);
break; break;
case 0: case 0:
jj_consume_token(0); jj_consume_token(0);
@ -149,6 +151,9 @@ public class Parser implements ParserConstants {
case FS: case FS:
cmd = fsCommand(); cmd = fsCommand();
break; break;
case JAR:
cmd = jarCommand();
break;
default: default:
jj_la1[2] = jj_gen; jj_la1[2] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
@ -188,6 +193,41 @@ public class Parser implements ParserConstants {
throw new Error("Missing return statement in function"); throw new Error("Missing return statement in function");
} }
final public JarCommand jarCommand() throws ParseException {
Token t = null;
JarCommand jar = new JarCommand();
List<String> query = new ArrayList<String>();
jj_consume_token(JAR);
label_2:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ID:
case INTEGER_LITERAL:
;
break;
default:
jj_la1[4] = jj_gen;
break label_2;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ID:
t = jj_consume_token(ID);
break;
case INTEGER_LITERAL:
t = jj_consume_token(INTEGER_LITERAL);
break;
default:
jj_la1[5] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
query.add(t.image.toString());
}
jar.setQuery(query);
{if (true) return jar;}
throw new Error("Missing return statement in function");
}
final public HelpCommand helpCommand() throws ParseException { final public HelpCommand helpCommand() throws ParseException {
Token t = null; Token t = null;
HelpCommand help = new HelpCommand(); HelpCommand help = new HelpCommand();
@ -201,6 +241,7 @@ public class Parser implements ParserConstants {
case CREATE: case CREATE:
case DROP: case DROP:
case FS: case FS:
case JAR:
case EXIT: case EXIT:
case INSERT: case INSERT:
case DELETE: case DELETE:
@ -240,18 +281,21 @@ public class Parser implements ParserConstants {
case FS: case FS:
t = jj_consume_token(FS); t = jj_consume_token(FS);
break; break;
case JAR:
t = jj_consume_token(JAR);
break;
case ID: case ID:
t = jj_consume_token(ID); t = jj_consume_token(ID);
break; break;
default: default:
jj_la1[4] = jj_gen; jj_la1[6] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
argument = t.image.toString(); argument = t.image.toString();
break; break;
default: default:
jj_la1[5] = jj_gen; jj_la1[7] = jj_gen;
; ;
} }
help.setArgument(argument); help.setArgument(argument);
@ -270,7 +314,7 @@ public class Parser implements ParserConstants {
argument = Identifier(); argument = Identifier();
break; break;
default: default:
jj_la1[6] = jj_gen; jj_la1[8] = jj_gen;
; ;
} }
show.setArgument(argument); show.setArgument(argument);
@ -289,7 +333,7 @@ public class Parser implements ParserConstants {
jj_consume_token(DESC); jj_consume_token(DESC);
break; break;
default: default:
jj_la1[7] = jj_gen; jj_la1[9] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -303,7 +347,7 @@ public class Parser implements ParserConstants {
Map<String, Object> columnSpec = new HashMap<String, Object>(); Map<String, Object> columnSpec = new HashMap<String, Object>();
int n = -1; int n = -1;
Token t = null; Token t = null;
label_2: label_3:
while (true) { while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case MAX_VERSIONS: case MAX_VERSIONS:
@ -317,8 +361,8 @@ public class Parser implements ParserConstants {
; ;
break; break;
default: default:
jj_la1[8] = jj_gen; jj_la1[10] = jj_gen;
break label_2; break label_3;
} }
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case MAX_VERSIONS: case MAX_VERSIONS:
@ -347,7 +391,7 @@ public class Parser implements ParserConstants {
t = jj_consume_token(RECORD); t = jj_consume_token(RECORD);
break; break;
default: default:
jj_la1[9] = jj_gen; jj_la1[11] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -371,7 +415,7 @@ public class Parser implements ParserConstants {
t = jj_consume_token(RETOUCHED_BLOOMFILTER); t = jj_consume_token(RETOUCHED_BLOOMFILTER);
break; break;
default: default:
jj_la1[10] = jj_gen; jj_la1[12] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -396,7 +440,7 @@ public class Parser implements ParserConstants {
columnSpec.put("NUM_ENTRIES", n); columnSpec.put("NUM_ENTRIES", n);
break; break;
default: default:
jj_la1[11] = jj_gen; jj_la1[13] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -418,15 +462,15 @@ public class Parser implements ParserConstants {
column = Identifier(); column = Identifier();
columnSpec = ColumnSpec(); columnSpec = ColumnSpec();
createCommand.addColumnSpec(column, columnSpec); createCommand.addColumnSpec(column, columnSpec);
label_3: label_4:
while (true) { while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA: case COMMA:
; ;
break; break;
default: default:
jj_la1[12] = jj_gen; jj_la1[14] = jj_gen;
break label_3; break label_4;
} }
jj_consume_token(COMMA); jj_consume_token(COMMA);
column = Identifier(); column = Identifier();
@ -462,15 +506,15 @@ public class Parser implements ParserConstants {
column = Identifier(); column = Identifier();
columnSpec = ColumnSpec(); columnSpec = ColumnSpec();
alterCommand.addColumnSpec(column, columnSpec); alterCommand.addColumnSpec(column, columnSpec);
label_4: label_5:
while (true) { while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA: case COMMA:
; ;
break; break;
default: default:
jj_la1[13] = jj_gen; jj_la1[15] = jj_gen;
break label_4; break label_5;
} }
jj_consume_token(COMMA); jj_consume_token(COMMA);
column = Identifier(); column = Identifier();
@ -493,7 +537,7 @@ public class Parser implements ParserConstants {
alterCommand.addColumnSpec(column, columnSpec); alterCommand.addColumnSpec(column, columnSpec);
break; break;
default: default:
jj_la1[14] = jj_gen; jj_la1[16] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -539,7 +583,7 @@ public class Parser implements ParserConstants {
t = jj_consume_token(QUOTED_IDENTIFIER); t = jj_consume_token(QUOTED_IDENTIFIER);
break; break;
default: default:
jj_la1[15] = jj_gen; jj_la1[17] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -570,7 +614,7 @@ public class Parser implements ParserConstants {
t = jj_consume_token(QUOTED_IDENTIFIER); t = jj_consume_token(QUOTED_IDENTIFIER);
break; break;
default: default:
jj_la1[16] = jj_gen; jj_la1[18] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -608,7 +652,7 @@ public class Parser implements ParserConstants {
jj_consume_token(FROM); jj_consume_token(FROM);
break; break;
default: default:
jj_la1[17] = jj_gen; jj_la1[19] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -616,7 +660,7 @@ public class Parser implements ParserConstants {
select.setRowKey(rowKey); select.setRowKey(rowKey);
break; break;
default: default:
jj_la1[18] = jj_gen; jj_la1[20] = jj_gen;
; ;
} }
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@ -626,7 +670,7 @@ public class Parser implements ParserConstants {
select.setTimestamp(timestamp); select.setTimestamp(timestamp);
break; break;
default: default:
jj_la1[19] = jj_gen; jj_la1[21] = jj_gen;
; ;
} }
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@ -636,7 +680,7 @@ public class Parser implements ParserConstants {
select.setVersion(numVersion); select.setVersion(numVersion);
break; break;
default: default:
jj_la1[20] = jj_gen; jj_la1[22] = jj_gen;
; ;
} }
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@ -651,7 +695,7 @@ public class Parser implements ParserConstants {
} }
break; break;
default: default:
jj_la1[21] = jj_gen; jj_la1[23] = jj_gen;
; ;
} }
{if (true) return select;} {if (true) return select;}
@ -693,7 +737,7 @@ public class Parser implements ParserConstants {
jj_consume_token(LPAREN); jj_consume_token(LPAREN);
literal = getStringLiteral(); literal = getStringLiteral();
if(literal != null) values.add(literal); if(literal != null) values.add(literal);
label_5: label_6:
while (true) { while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA: case COMMA:
@ -703,8 +747,8 @@ public class Parser implements ParserConstants {
; ;
break; break;
default: default:
jj_la1[22] = jj_gen; jj_la1[24] = jj_gen;
break label_5; break label_6;
} }
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA: case COMMA:
@ -726,14 +770,14 @@ public class Parser implements ParserConstants {
jj_consume_token(QUOTED_IDENTIFIER); jj_consume_token(QUOTED_IDENTIFIER);
break; break;
default: default:
jj_la1[23] = jj_gen; jj_la1[25] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
values.removeAll(values); values.removeAll(values);
break; break;
default: default:
jj_la1[24] = jj_gen; jj_la1[26] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -753,7 +797,7 @@ public class Parser implements ParserConstants {
s = jj_consume_token(QUOTED_IDENTIFIER); s = jj_consume_token(QUOTED_IDENTIFIER);
break; break;
default: default:
jj_la1[25] = jj_gen; jj_la1[27] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -768,15 +812,15 @@ public class Parser implements ParserConstants {
jj_consume_token(LPAREN); jj_consume_token(LPAREN);
literal = getColumn(); literal = getColumn();
if(literal != null) values.add(literal); if(literal != null) values.add(literal);
label_6: label_7:
while (true) { while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA: case COMMA:
; ;
break; break;
default: default:
jj_la1[26] = jj_gen; jj_la1[28] = jj_gen;
break label_6; break label_7;
} }
jj_consume_token(COMMA); jj_consume_token(COMMA);
literal = getColumn(); literal = getColumn();
@ -800,7 +844,7 @@ public class Parser implements ParserConstants {
col = jj_consume_token(ASTERISK); col = jj_consume_token(ASTERISK);
break; break;
default: default:
jj_la1[27] = jj_gen; jj_la1[29] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -816,14 +860,14 @@ public class Parser implements ParserConstants {
col = jj_consume_token(STRING_LITERAL); col = jj_consume_token(STRING_LITERAL);
break; break;
default: default:
jj_la1[28] = jj_gen; jj_la1[30] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
{if (true) return col.image.substring(1,col.image.toString().length() - 1);} {if (true) return col.image.substring(1,col.image.toString().length() - 1);}
break; break;
default: default:
jj_la1[29] = jj_gen; jj_la1[31] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -835,15 +879,15 @@ public class Parser implements ParserConstants {
String table = null; String table = null;
table = Identifier(); table = Identifier();
tableList.add(table); tableList.add(table);
label_7: label_8:
while (true) { while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA: case COMMA:
; ;
break; break;
default: default:
jj_la1[30] = jj_gen; jj_la1[32] = jj_gen;
break label_7; break label_8;
} }
jj_consume_token(COMMA); jj_consume_token(COMMA);
table = Identifier(); table = Identifier();
@ -862,15 +906,15 @@ public class Parser implements ParserConstants {
} else { } else {
{if (true) return columnList;} {if (true) return columnList;}
} }
label_8: label_9:
while (true) { while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA: case COMMA:
; ;
break; break;
default: default:
jj_la1[31] = jj_gen; jj_la1[33] = jj_gen;
break label_8; break label_9;
} }
jj_consume_token(COMMA); jj_consume_token(COMMA);
column = getColumn(); column = getColumn();
@ -904,14 +948,14 @@ public class Parser implements ParserConstants {
t = jj_consume_token(STRING_LITERAL); t = jj_consume_token(STRING_LITERAL);
break; break;
default: default:
jj_la1[32] = jj_gen; jj_la1[34] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
{if (true) return t.image.substring(1,t.image.toString().length() - 1);} {if (true) return t.image.substring(1,t.image.toString().length() - 1);}
break; break;
default: default:
jj_la1[33] = jj_gen; jj_la1[35] = jj_gen;
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
@ -925,33 +969,33 @@ public class Parser implements ParserConstants {
finally { jj_save(0, xla); } finally { jj_save(0, xla); }
} }
final private boolean jj_3R_9() { final private boolean jj_3R_10() {
Token xsp; Token xsp;
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_10()) { if (jj_3R_11()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_11()) return true; if (jj_3R_12()) return true;
} }
return false; return false;
} }
final private boolean jj_3_1() { final private boolean jj_3_1() {
if (jj_scan_token(ADD)) return true; if (jj_scan_token(ADD)) return true;
if (jj_3R_9()) return true; if (jj_3R_10()) return true;
return false; return false;
} }
final private boolean jj_3R_11() { final private boolean jj_3R_12() {
Token xsp; Token xsp;
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_scan_token(59)) { if (jj_scan_token(60)) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_scan_token(60)) return true; if (jj_scan_token(61)) return true;
} }
return false; return false;
} }
final private boolean jj_3R_10() { final private boolean jj_3R_11() {
if (jj_scan_token(ID)) return true; if (jj_scan_token(ID)) return true;
return false; return false;
} }
@ -965,7 +1009,7 @@ public class Parser implements ParserConstants {
public boolean lookingAhead = false; public boolean lookingAhead = false;
private boolean jj_semLA; private boolean jj_semLA;
private int jj_gen; private int jj_gen;
final private int[] jj_la1 = new int[34]; final private int[] jj_la1 = new int[36];
static private int[] jj_la1_0; static private int[] jj_la1_0;
static private int[] jj_la1_1; static private int[] jj_la1_1;
static { static {
@ -973,10 +1017,10 @@ public class Parser implements ParserConstants {
jj_la1_1(); jj_la1_1();
} }
private static void jj_la1_0() { private static void jj_la1_0() {
jj_la1_0 = new int[] {0x3cffe0,0x3cffe1,0x3cffe0,0x0,0xcfbc0,0xcfbc0,0x0,0x600,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0xc00000,0xc00000,0x10000000,0x20000000,0x40000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; jj_la1_0 = new int[] {0x79ffe0,0x79ffe1,0x79ffe0,0x0,0x0,0x0,0x19fbc0,0x19fbc0,0x0,0x600,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x1800000,0x1800000,0x20000000,0x40000000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
} }
private static void jj_la1_1() { private static void jj_la1_1() {
jj_la1_1 = new int[] {0x0,0x20000000,0x0,0x800000,0x800000,0x800000,0x18800000,0x0,0x1cc700,0x3800,0x38000,0x1cc700,0x2,0x2,0x600000,0x18000000,0x18000000,0x0,0x0,0x0,0x0,0x0,0x18800002,0x18800000,0x18800002,0x18000000,0x2,0x800080,0x18000000,0x18800080,0x2,0x2,0x18000000,0x18800000,}; jj_la1_1 = new int[] {0x0,0x40000000,0x0,0x1000000,0x3000000,0x3000000,0x1000000,0x1000000,0x31000000,0x0,0x398e00,0x7000,0x70000,0x398e00,0x4,0x4,0xc00000,0x30000000,0x30000000,0x0,0x0,0x0,0x0,0x0,0x31000004,0x31000000,0x31000004,0x30000000,0x4,0x1000100,0x30000000,0x31000100,0x4,0x4,0x30000000,0x31000000,};
} }
final private JJCalls[] jj_2_rtns = new JJCalls[1]; final private JJCalls[] jj_2_rtns = new JJCalls[1];
private boolean jj_rescan = false; private boolean jj_rescan = false;
@ -991,7 +1035,7 @@ public class Parser implements ParserConstants {
token = new Token(); token = new Token();
jj_ntk = -1; jj_ntk = -1;
jj_gen = 0; jj_gen = 0;
for (int i = 0; i < 34; i++) jj_la1[i] = -1; for (int i = 0; i < 36; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
} }
@ -1004,7 +1048,7 @@ public class Parser implements ParserConstants {
token = new Token(); token = new Token();
jj_ntk = -1; jj_ntk = -1;
jj_gen = 0; jj_gen = 0;
for (int i = 0; i < 34; i++) jj_la1[i] = -1; for (int i = 0; i < 36; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
} }
@ -1014,7 +1058,7 @@ public class Parser implements ParserConstants {
token = new Token(); token = new Token();
jj_ntk = -1; jj_ntk = -1;
jj_gen = 0; jj_gen = 0;
for (int i = 0; i < 34; i++) jj_la1[i] = -1; for (int i = 0; i < 36; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
} }
@ -1024,7 +1068,7 @@ public class Parser implements ParserConstants {
token = new Token(); token = new Token();
jj_ntk = -1; jj_ntk = -1;
jj_gen = 0; jj_gen = 0;
for (int i = 0; i < 34; i++) jj_la1[i] = -1; for (int i = 0; i < 36; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
} }
@ -1033,7 +1077,7 @@ public class Parser implements ParserConstants {
token = new Token(); token = new Token();
jj_ntk = -1; jj_ntk = -1;
jj_gen = 0; jj_gen = 0;
for (int i = 0; i < 34; i++) jj_la1[i] = -1; for (int i = 0; i < 36; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
} }
@ -1042,7 +1086,7 @@ public class Parser implements ParserConstants {
token = new Token(); token = new Token();
jj_ntk = -1; jj_ntk = -1;
jj_gen = 0; jj_gen = 0;
for (int i = 0; i < 34; i++) jj_la1[i] = -1; for (int i = 0; i < 36; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
} }
@ -1153,15 +1197,15 @@ public class Parser implements ParserConstants {
public ParseException generateParseException() { public ParseException generateParseException() {
jj_expentries.removeAllElements(); jj_expentries.removeAllElements();
boolean[] la1tokens = new boolean[62]; boolean[] la1tokens = new boolean[63];
for (int i = 0; i < 62; i++) { for (int i = 0; i < 63; i++) {
la1tokens[i] = false; la1tokens[i] = false;
} }
if (jj_kind >= 0) { if (jj_kind >= 0) {
la1tokens[jj_kind] = true; la1tokens[jj_kind] = true;
jj_kind = -1; jj_kind = -1;
} }
for (int i = 0; i < 34; i++) { for (int i = 0; i < 36; i++) {
if (jj_la1[i] == jj_gen) { if (jj_la1[i] == jj_gen) {
for (int j = 0; j < 32; j++) { for (int j = 0; j < 32; j++) {
if ((jj_la1_0[i] & (1<<j)) != 0) { if ((jj_la1_0[i] & (1<<j)) != 0) {
@ -1173,7 +1217,7 @@ public class Parser implements ParserConstants {
} }
} }
} }
for (int i = 0; i < 62; i++) { for (int i = 0; i < 63; i++) {
if (la1tokens[i]) { if (la1tokens[i]) {
jj_expentry = new int[1]; jj_expentry = new int[1];
jj_expentry[0] = i; jj_expentry[0] = i;

View File

@ -13,53 +13,54 @@ public interface ParserConstants {
int CREATE = 11; int CREATE = 11;
int DROP = 12; int DROP = 12;
int FS = 13; int FS = 13;
int EXIT = 14; int JAR = 14;
int INSERT = 15; int EXIT = 15;
int INTO = 16; int INSERT = 16;
int TABLE = 17; int INTO = 17;
int DELETE = 18; int TABLE = 18;
int SELECT = 19; int DELETE = 19;
int ENABLE = 20; int SELECT = 20;
int DISABLE = 21; int ENABLE = 21;
int STARTING = 22; int DISABLE = 22;
int WHERE = 23; int STARTING = 23;
int FROM = 24; int WHERE = 24;
int ROW = 25; int FROM = 25;
int VALUES = 26; int ROW = 26;
int COLUMNFAMILIES = 27; int VALUES = 27;
int TIMESTAMP = 28; int COLUMNFAMILIES = 28;
int NUM_VERSIONS = 29; int TIMESTAMP = 29;
int LIMIT = 30; int NUM_VERSIONS = 30;
int AND = 31; int LIMIT = 31;
int OR = 32; int AND = 32;
int COMMA = 33; int OR = 33;
int DOT = 34; int COMMA = 34;
int LPAREN = 35; int DOT = 35;
int RPAREN = 36; int LPAREN = 36;
int EQUALS = 37; int RPAREN = 37;
int NOTEQUAL = 38; int EQUALS = 38;
int ASTERISK = 39; int NOTEQUAL = 39;
int MAX_VERSIONS = 40; int ASTERISK = 40;
int MAX_LENGTH = 41; int MAX_VERSIONS = 41;
int COMPRESSION = 42; int MAX_LENGTH = 42;
int NONE = 43; int COMPRESSION = 43;
int BLOCK = 44; int NONE = 44;
int RECORD = 45; int BLOCK = 45;
int IN_MEMORY = 46; int RECORD = 46;
int BLOOMFILTER = 47; int IN_MEMORY = 47;
int COUNTING_BLOOMFILTER = 48; int BLOOMFILTER = 48;
int RETOUCHED_BLOOMFILTER = 49; int COUNTING_BLOOMFILTER = 49;
int VECTOR_SIZE = 50; int RETOUCHED_BLOOMFILTER = 50;
int NUM_HASH = 51; int VECTOR_SIZE = 51;
int NUM_ENTRIES = 52; int NUM_HASH = 52;
int ADD = 53; int NUM_ENTRIES = 53;
int CHANGE = 54; int ADD = 54;
int ID = 55; int CHANGE = 55;
int INTEGER_LITERAL = 56; int ID = 56;
int FLOATING_POINT_LITERAL = 57; int INTEGER_LITERAL = 57;
int EXPONENT = 58; int FLOATING_POINT_LITERAL = 58;
int QUOTED_IDENTIFIER = 59; int EXPONENT = 59;
int STRING_LITERAL = 60; int QUOTED_IDENTIFIER = 60;
int STRING_LITERAL = 61;
int DEFAULT = 0; int DEFAULT = 0;
@ -78,6 +79,7 @@ public interface ParserConstants {
"\"create\"", "\"create\"",
"\"drop\"", "\"drop\"",
"\"fs\"", "\"fs\"",
"\"jar\"",
"\"exit\"", "\"exit\"",
"\"insert\"", "\"insert\"",
"\"into\"", "\"into\"",