@Override
public Long count() {
HiveClient hiveClient = createHiveClient();
try {
hiveClient.execute("select count(*) from " + tableName);
return Long.parseLong(hiveClient.fetchOne());
// checked exceptions
} catch (HiveServerException ex) {
throw translateExcpetion(ex);
} catch (org.apache.thrift.TException tex) {