Examples of QueryDef


Examples of com.jitlogic.zorka.core.perfmon.QueryDef


    @Test
    public void testSearchAndGetMultipleSecondLevelAttr() {
        QueryLister lister = new QueryLister(mBeanServerRegistry,
                new QueryDef("test", "test:type=TestJmx,*", "name").get("StrMap").getAs("oja", "Attr"));

        List<QueryResult> results = lister.list();

        Assert.assertEquals(2, results.size());

View Full Code Here

Examples of com.jitlogic.zorka.core.perfmon.QueryDef


    @Test
    public void testSearchWithSomeRecordsHavingNoSuchAttr() {
        QueryLister lister = new QueryLister(mBeanServerRegistry,
                new QueryDef("test", "test:type=TestJmx,*", "name").get("StrMap").get("uja").with(QueryDef.NO_NULL_VALS));

        List<QueryResult> results = lister.list();

        Assert.assertEquals(1, results.size());
    }
View Full Code Here

Examples of com.jitlogic.zorka.core.perfmon.QueryDef


    @Test
    public void testSearchWithNullAttrsInObjectName() throws Exception {
        QueryLister lister = new QueryLister(mBeanServerRegistry,
                new QueryDef("test", "test:*", "name").with(QueryDef.NO_NULL_ATTRS));
        makeTestJmx("test:name=oja", 10, 10);

        List<QueryResult> results = lister.list();

        Assert.assertEquals(1, results.size());
View Full Code Here

Examples of com.jitlogic.zorka.core.perfmon.QueryDef

        return new JSONWriter().write(_discovery(mbs, filter, attrs));
    }


    public Map<String, List<Map<String, String>>> _discovery(String mbs, String filter, String... attrs) {
        return _discovery(QueryDef.NO_NULL_ATTRS, new QueryDef(mbs, filter, attrs));
    }
View Full Code Here

Examples of com.sap.hadoop.windowing.query2.definition.QueryDef

 
  public QueryDef translate(QuerySpec qSpec, WindowingShell wShell) throws WindowingException
  {
    // clone the cfg
    HiveConf qCfg = new HiveConf(wShell.getCfg());
    QueryDef qry = new QueryDef();
    qry.setSpec(qSpec);
   
    QueryTranslationInfo transInfo = new QueryTranslationInfo();
    transInfo.setHiveCfg(qCfg);
    transInfo.setWshell(wShell);
    try
    {
      transInfo.setHive(Hive.get(qCfg));
      transInfo.setHiveMSClient(HiveUtils.getClient(qCfg));
    }
    catch(HiveException he)
    {
      throw new WindowingException(he);
    }
    qry.setTranslationInfo(transInfo);
   
    InputTranslation.translate(qry);
    WhereTranslation.translate(qry);
    OutputTranslation.translate(qry);
View Full Code Here

Examples of com.sap.hadoop.windowing.query2.definition.QueryDef

  @Test
  public void test() throws Exception
  {
    System.out.println("Beginning testReduceOnlyPlan");

    QueryDef qDef = wshell
        .translate("select  p_mfgr,p_name, p_size,\n"
            + "rank() as r,\n"
            + "denserank() as dr\n"
            + "from part_tiny\n"
            + "partition by p_mfgr\n"
View Full Code Here

Examples of com.sap.hadoop.windowing.query2.definition.QueryDef

  @Test
  public void testNPath() throws Exception
  {
    System.out.println("Beginning testReduceOnlyPlan");

    QueryDef qDef = wshell
        .translate(" select origin_city_name, fl_num, year, month, day_of_month, sz, tpath " +
            " from npath( " +
            "         flights_tiny " +
            "         partition by fl_num " +
            "        order by year, month, day_of_month, " +
View Full Code Here

Examples of com.sap.hadoop.windowing.query2.definition.QueryDef

  }
 
  @Test
  public void testAddInOrder() throws WindowingException
  {
    QueryDef qDef = wshell.translate("select  p_mfgr,p_name, p_size, " +
        "sum(p_size) over w1 as s, " +
        " denserank() as dr " +
        " from part_demo " +
        " partition by p_mfgr" +
        " window w1 as rows between 2 preceding and 2 following" +
        " into path='/tmp/wout2'" +
        " serde 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'" +
        " with serdeproperties('field.delim'=',')" +
        " format 'org.apache.hadoop.mapred.TextOutputFormat'");
   
    OrderDef oDef = qDef.getInput().getWindow().getOrderDef();
    assert oDef != null;
    assert oDef.getSpec().getColumns().get(0).getColumnName() == "p_mfgr";
   
  }
View Full Code Here

Examples of com.sap.hadoop.windowing.query2.definition.QueryDef

  }
 
  @Test
  public void testWindowClause() throws WindowingException
  {
    QueryDef qDef = wshell.translate("select  p_mfgr,p_name, p_size, " +
        "sum(p_size) over w1 as s, " +
        " denserank() as dr " +
        " from part_demo " +
        " partition by p_mfgr" +
        " window w1 as rows between 2 preceding and 2 following" +
        " into path='/tmp/wout2'" +
        " serde 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'" +
        " with serdeproperties('field.delim'=',')" +
        " format 'org.apache.hadoop.mapred.TextOutputFormat'");
   
    RangeBoundaryDef rBdef = (RangeBoundaryDef) qDef.getSelectList().getWindowFuncs().get(0).getWindow().getWindow().getStart();
    assert rBdef.getAmt() == 2;
    rBdef = (RangeBoundaryDef) qDef.getSelectList().getWindowFuncs().get(0).getWindow().getWindow().getEnd();
    assert rBdef.getAmt() == 2;
   
  }
View Full Code Here

Examples of com.sap.hadoop.windowing.query2.definition.QueryDef

  }

  public void execute(String query, QueryOutputPrinter outP) throws WindowingException
  {
    QuerySpec qSpec = parse(query);
    QueryDef q = translator.translate(qSpec, this);
   
    ArrayList<QueryDef> componentQueries;
    executor.beforeComponentization(q, this);
    QueryComponentizer qC = new QueryComponentizer(q, this);
    componentQueries = qC.componentize();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.