Package com.dianping.cosmos.hive.server.store.domain

Examples of com.dianping.cosmos.hive.server.store.domain.QueryHistory


    String resultLocation = "";
    if (result.getStoreFileLocation() != null){
      resultLocation = result.getStoreFileLocation();
    }
   
    QueryHistory history = new QueryHistory();
    history.setHql(input.getHql());
    history.setUsername(input.getUsername());
    history.setAddtime(new Date(input.getTimestamp()));
    history.setFilename(resultLocation);
    queryHistoryService.insertQueryHistory(history);
   
    HiveQueryOutputBo bo = result.toHiveQueryOutputBo();
    return bo;
  }
View Full Code Here


  @Autowired
  private QueryHistoryService queryHistoryService;

  @Test
  public void testInsertQueryHistory() throws Exception {
    QueryHistory qh = new QueryHistory();
    qh.setUsername("yukang.chen");
    qh.setHql("select * from hippolog limit 3");
    qh.setAddtime(new Date());
    qh.setFilename("file_" + UUID.randomUUID());
    queryHistoryService.insertQueryHistory(qh);
  }
View Full Code Here

TOP

Related Classes of com.dianping.cosmos.hive.server.store.domain.QueryHistory

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.