Package com.alimama.mdrill.ui.service.partions.AdhocHivePartions

Examples of com.alimama.mdrill.ui.service.partions.AdhocHivePartions.KmeansQueryParse


 
 
  public static void main(String[] args) throws Exception {
   
    String querStr="[{\"thedate\":{\"operate\":9,\"value\":[\"20140707\",\"20140707\"]}},{\"ismatch\":{\"operate\":\"1\",\"value\":\"搜索\"}}]";
    KmeansQueryParse kmeansData = AdhocHivePartions.getKmeansDays(querStr);
    System.out.println(kmeansData.queryStr);

    ArrayList<String> fqList = WebServiceParams.fqListHive(false,"dt",querStr,false, new HashMap<String, String>(),null,null,null);
   
    StringBuffer sqlWhere =AdhocWebServiceParams.makeWhere(fqList,new ArrayList<String>(),"userid");
View Full Code Here


    queryStr = WebServiceParams.query(queryStr);


    TablePartion part = GetPartions.partion(projectName);
    KmeansQueryParse kmeansData = AdhocHivePartions.getKmeansDays(queryStr);
   
    LinkedHashMap<String, String> filetypeMap = MdrillFieldInfo.readFieldsFromSchemaXml(stormconf,part.name);
    ArrayList<String> fqList = WebServiceParams.fqListHive(false,hpart,kmeansData.queryStr,isPartionByPt, filetypeMap,null,null,null);
   
    StringBuffer sqlWhere =AdhocWebServiceParams.makeWhere(fqList,exlist,idcols);
    LOG.info("queryStr:"+queryStr+">>>>kmeansData.queryStr:"+kmeansData.queryStr+","+sqlWhere.toString()+","+fqList.toString());

 
//    String hql = "select custid from " + projectName + " " + sqlWhere.toString() + " " ;
    final String[] sqlparams=PrintSql.makeSql(projectName, sqlWhere.toString(), idcols, kmeansData.getSortDays(), colls_important, number_important, colls, numbers);;
    String hql=sqlparams[0];
   
    String md5 = MD5.getMD5(hql);
 
    SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMdd");
View Full Code Here

TOP

Related Classes of com.alimama.mdrill.ui.service.partions.AdhocHivePartions.KmeansQueryParse

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.