class ROdps {

  public boolean isTableExist(String projectName, String tableName, String partition)
      throws ROdpsException {
    if (partition != null) {
      partition = formatPartition(partition, "'", ",");
    }
    // Table table = new Table(this.getProjectObject(projectName), tableName);
    // Table table = odps.tables().get(projectName,tableName);
    Table table = odps.tables().get(this.getProjectName(projectName), tableName);
    try {
      if (partition == null || partition.isEmpty()) {
        table.reload();
        return true;
      } else {
        // List<String> pts = table.listPartitions();
        // return pts!=null && pts.size()>0 && pts.contains(partition);
        return table.hasPartition(new PartitionSpec(partition));
      }
    } catch (OdpsException e) {
      if (e.getMessage().indexOf("Table not found") > 0) {
        return false;
      }
      LOG.error(e);
      throw new ROdpsException(e);
    }
  }

  public  ROdps(String projectName, String accessID, String accessKey, String endPoint,
      String dtEndpoint, String logviewHost, String log4j_properties);

}