FilterList list=new FilterList (FilterList. Operator. MUST_PASS_ONE);
RowFilter rf=new RowFilter (
CompareOp. EQUAL,
New SubstringComparator (" 81261.1.1 ")
);
List. AddFilter (rf);
Scan s=new Scan ();
S.s etFilter (list);
ResultScanner rs=htable. GetScanner (s);
To return the result for printing and found two problems
1) data back slowly, starts to have data to return after about 20 s
2) after the part return data, program error:
Java. Lang. RuntimeException: org, apache hadoop, hbase. Client. RetriesExhaustedException: Failed after attempts=36, exceptions:
Tue Oct 11 09:45:16 CST 2016, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=60312: row '66834 _6531' on the table 'data_v1 at region=ispec_exp_data_v1, _6531 66834, 1471038265262. B980e46b96c39067949e3fa76c216b52., hostname=datanode1, 16020147696869, 83, seqNum=38216730
At org, apache hadoop. Hbase. Client. AbstractClientScanner $1. HasNext (AbstractClientScanner. Java: 97)
The at hbasetest. ScanExpData_v1. Main (ScanExpData_v1. Java: 51)
Under Caused by: org, apache hadoop, hbase. Client. RetriesExhaustedException: Failed after attempts=36, exceptions:
Tue Oct 11 09:45:16 CST 2016, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=60312: row '66834 _6531' on the table 'data_v1 at region=data_v1, _6531 66834, 1471038265262. B980e46b96c39067949e3fa76c216b52., hostname=datanode1, 16020147696869, 83, seqNum=38216730
At org, apache hadoop. Hbase. Client. RpcRetryingCallerWithReadReplicas. ThrowEnrichedException (RpcRetryingCallerWithReadReplicas. Java: 271)
At org, apache hadoop. Hbase. Client. ScannerCallableWithReplicas. Call (207) ScannerCallableWithReplicas. Java:
At org, apache hadoop. Hbase. Client. ScannerCallableWithReplicas. Call (60) ScannerCallableWithReplicas. Java:
At org, apache hadoop. Hbase. Client. RpcRetryingCaller. CallWithoutRetries (RpcRetryingCaller. Java: 210)
At org, apache hadoop. Hbase. Client. ClientScanner. Call (326) ClientScanner. Java:
At org, apache hadoop. Hbase. Client. ClientScanner. LoadCache (ClientScanner. Java: 409)
At org, apache hadoop. Hbase. Client. ClientScanner. Next (ClientScanner. Java: 370)
At org, apache hadoop. Hbase. Client. AbstractClientScanner $1. HasNext (AbstractClientScanner. Java: 94)
. 1 more
CodePudding user response:
Complement, found in the datanode log an error message:Regionserver. RSRpcServices: Scanner 545 lease expired on region data_v1, _6531 66834, 1471038265262. B980e46b96c39067949e3fa76c216b52
CodePudding user response:
Brother, how to solve I always quote this but sometimes can be successful