Example #1
0
 public String toString() {
   SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
   StringBuilder builder = new StringBuilder();
   builder
       .append("taskNo=")
       .append(taskInfo.taskNo)
       .append(",")
       .append("filename=")
       .append(taskInfo.filename)
       .append(",")
       .append("pagesize=")
       .append(taskInfo.pagesize)
       .append(",")
       .append("start=")
       .append(taskInfo.startoffset)
       .append(",")
       .append("end=")
       .append(taskInfo.endoffset)
       .append(",");
   if (taskInfo.getSubpartition() != null) {
     builder.append("subpartition=").append(taskInfo.getSubpartition()).append(",");
   }
   if (taskInfo.getPartitionName() != null) {
     builder.append("partition=").append(taskInfo.getPartitionName()).append(",");
   }
   builder
       .append("gen start timestamp=")
       .append(genstarttimestamp > 0 ? format.format(new Date(genstarttimestamp)) : "")
       .append(",")
       .append("gen end timestamp=")
       .append(genendtimestamp > 0 ? format.format(new Date(genendtimestamp)) : "")
       .append(",");
   if (this.job.genlocalfile()) {
     builder
         .append("up start timestamp=")
         .append(upstarttimestamp > 0 ? format.format(new Date(upstarttimestamp)) : "")
         .append(",")
         .append("up end timestamp=")
         .append(upendtimestamp > 0 ? format.format(new Date(upendtimestamp)) : "")
         .append(",");
   }
   builder.append(" totalrows=").append(rows);
   return builder.toString();
 }
Example #2
0
 public String getQuerystatement() {
   if (!this.usepartition()) return this.job.config.getQuerystatement();
   else {
     if (!taskInfo.isIssubpartition())
       return this.job
           .config
           .getQuerystatement()
           .replace("#{partition}", " PARTITION  (" + taskInfo.getPartitionName() + ")");
     else
       return this.job
           .config
           .getQuerystatement()
           .replace("#{partition}", " SUBPARTITION  (" + taskInfo.getSubpartition() + ")");
   }
 }