Package com.alimama.mdrill.adhoc

Examples of com.alimama.mdrill.adhoc.OfflineDownload


          }
         
        }
      };
      callback.setCols("");
      OfflineDownload download = new OfflineDownload();
      download.setOffline(callback);
      if (mailto == null || mailto.length() <= 0) {
        mailto = "yannian.mu@alipay.com";
      }
     
      download.setMailto(mailto);
      download.setHql(" INSERT OVERWRITE DIRECTORY '" + store+"/hive" + "' " + hql+"  ");
      download.setUseName(username);
      if (jobname == null || jobname.length() <= 0) {
        jobname = day + "_" + md5;
      }
      download.setJobName(jobname);
      download.setMemo(String.valueOf(memo));
      download.setDisplayParams(params);
      download.setStoreDir(storepath);
      download.setConfdir(hdpConf);
      download.setSqlMd5(md5);
      download.setProcesser(process);
      download.run();
 
      long t2 = System.currentTimeMillis();
      jsonObj.put("code", "1");
 
      jsonObj.put("message","数据下载中...完成后将会通过<b style=\"color:red\">旺旺</b>和<b style=\"color:red\">邮件</b>通知");
View Full Code Here


        }
      }
 
      callback.setCols((params == null || params.isEmpty()) ? cols
          .toString() : listgroup.toString() + liststat.toString());
      OfflineDownload download = new OfflineDownload();
      download.setOffline(callback);
      if (mailto == null || mailto.length() <= 0) {
        mailto = "yannian.mu@alipay.com";
      }
     
      StringBuffer setSql=new StringBuffer();
      StringBuffer cleanSql=new StringBuffer();
      for(int i=0;i<joins.length;i++)
      {
        HigoAdhocJoinParams jp=joins[i];
       
        setSql.append(jp.createSql);
        setSql.append(";");
        setSql.append(jp.addData);
        setSql.append(";");

        cleanSql.append(";");
        cleanSql.append(jp.DropSql);
      }
 
      download.setMailto(mailto);
      download.setHql(setSql.toString()+" INSERT OVERWRITE DIRECTORY '" + store + "' " + hql+"  "+cleanSql.toString());
 
      download.setUseName(username);
      if (jobname == null || jobname.length() <= 0) {
        jobname = day + "_" + md5;
      }
      download.setJobName(jobname);
      download.setMemo(String.valueOf(memo));
      download.setDisplayParams((params == null || params.isEmpty()) ? hql
          : params);
      download.setStoreDir(store);
      download.setConfdir(hdpConf);
      download.setSqlMd5(md5);
      download.run();
 
      long t2 = System.currentTimeMillis();
      jsonObj.put("code", "1");
 
      jsonObj.put("message",
View Full Code Here

TOP

Related Classes of com.alimama.mdrill.adhoc.OfflineDownload

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.