0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 package org.apache.hive.service.cli;
0020
0021 import java.util.Collections;
0022
0023 import org.apache.hive.service.auth.HiveAuthFactory;
0024
0025
0026
0027
0028
0029
0030 public abstract class CLIServiceClient implements ICLIService {
0031 private static final long DEFAULT_MAX_ROWS = 1000;
0032
0033 public SessionHandle openSession(String username, String password)
0034 throws HiveSQLException {
0035 return openSession(username, password, Collections.<String, String>emptyMap());
0036 }
0037
0038 @Override
0039 public RowSet fetchResults(OperationHandle opHandle) throws HiveSQLException {
0040
0041 return fetchResults(opHandle, FetchOrientation.FETCH_NEXT, DEFAULT_MAX_ROWS, FetchType.QUERY_OUTPUT);
0042 }
0043
0044 @Override
0045 public abstract String getDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory,
0046 String owner, String renewer) throws HiveSQLException;
0047
0048 @Override
0049 public abstract void cancelDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory,
0050 String tokenStr) throws HiveSQLException;
0051
0052 @Override
0053 public abstract void renewDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory,
0054 String tokenStr) throws HiveSQLException;
0055
0056 }