class ROdps {

  public void writeTableFromDT(String projectName, String tableName, String partition,
      String dataFilePathName, String columnDelimiter, String rowDelimiter, long recordCount,
      int threadNumber) throws ROdpsException {

    int retryTimes = 0;
    while (true) {
      try {
        LOG.info("before create RDTUploader");
        if (projectName == null) {
          projectName = this.ODPS_PROJECT_NAME;
        }
        if (partition != null) {
          partition = formatPartition(partition, "", ",");
        }
        Context<UploadSession> context =
            new Context<UploadSession>(odps, DT_ENDPOINT, projectName, tableName, partition, -1,
                columnDelimiter, rowDelimiter, threadNumber);
        context.setRecordCount(recordCount);
        RDTUploader uploader = new RDTUploader(context);
        uploader.upload(dataFilePathName);
        return;
      } catch (IOException e) {
        if (++retryTimes <= RETRY_MAX) {
          LOG.error("write table encounter exception:" + e.getMessage() + ", retry times = "
              + retryTimes);
          try {
            Thread.sleep(5000);
          } catch (InterruptedException e1) {
            LOG.error("Sleep interrupted!", e1);
          }
          continue;
        }
        throw new ROdpsException(e);
      } catch (Exception e) {
        throw new ROdpsException(e);
      }
    }
  }

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

}