Scanner sb = new Scanner(System.in);
System.out.print("insert or get?(i/g):");
String want = sb.nextLine();
if (want.equals("i")){
System.out.print("this is insert:");
System.out.print("please input tableName:");
String tableName = sb.nextLine();
System.out.print("please input rowKey:");
String rowKey = sb.nextLine();
System.out.print("please input colFamily :");
String colFamily = sb.nextLine();
System.out.print("please input col (if no col,it can null):");
String col = sb.nextLine();
System.out.print("please input val:");
String val = sb.nextLine();
insertRow( tableName, rowKey, colFamily, col,val);
}
else{
System.out.println("this is getData:");
System.out.print("please input tableName:");
String tableName1 = sb.nextLine();
System.out.print("please input rowKey:");
String rowKey1 = sb.nextLine();
System.out.print("please input colFamily :");
String colFamily1 = sb.nextLine();
System.out.print("please input col (if no col,it can null):");
String col1 = sb.nextLine();
getData( tableName1, rowKey1, colFamily1, col1);
}
sb.close();
System.out.print("insert or get?(i/g):");
String want = sb.nextLine();
if (want.equals("i")){
System.out.print("this is insert:");
System.out.print("please input tableName:");
String tableName = sb.nextLine();
System.out.print("please input rowKey:");
String rowKey = sb.nextLine();
System.out.print("please input colFamily :");
String colFamily = sb.nextLine();
System.out.print("please input col (if no col,it can null):");
String col = sb.nextLine();
System.out.print("please input val:");
String val = sb.nextLine();
insertRow( tableName, rowKey, colFamily, col,val);
}
else{
System.out.println("this is getData:");
System.out.print("please input tableName:");
String tableName1 = sb.nextLine();
System.out.print("please input rowKey:");
String rowKey1 = sb.nextLine();
System.out.print("please input colFamily :");
String colFamily1 = sb.nextLine();
System.out.print("please input col (if no col,it can null):");
String col1 = sb.nextLine();
getData( tableName1, rowKey1, colFamily1, col1);
}
sb.close();