Examples of CatalogService


Examples of org.apache.tajo.catalog.CatalogService

  public final void testInsertOverwriteWithCompression() throws Exception {
    String tableName = CatalogUtil.normalizeIdentifier("testInsertOverwriteWithCompression");
    ResultSet res = tpch.execute("create table " + tableName + " (col1 int4, col2 int4, col3 float8) USING csv WITH ('csvfile.delimiter'='|','compression.codec'='org.apache.hadoop.io.compress.DeflateCodec')");
    res.close();
    TajoTestingCluster cluster = tpch.getTestingCluster();
    CatalogService catalog = cluster.getMaster().getCatalog();
    assertTrue(catalog.existsTable(DEFAULT_DATABASE_NAME, tableName));

    res = tpch.execute("insert overwrite into " + tableName + " select  l_orderkey, l_partkey, l_quantity from lineitem where l_orderkey = 3");
    res.close();
    TableDesc desc = catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName);
    if (!cluster.isHCatalogStoreRunning()) {
      assertEquals(2, desc.getStats().getNumRows().intValue());
    }

    FileSystem fs = FileSystem.get(tpch.getTestingCluster().getConfiguration());
View Full Code Here

Examples of org.broadleafcommerce.core.catalog.service.CatalogService

    private long skuId;

    @Override
    public int doStartTag() throws JspException {
        WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
        CatalogService catalogService = (CatalogService) applicationContext.getBean("blCatalogService");
        pageContext.setAttribute(var, catalogService.findSkuById(skuId));
        return EVAL_PAGE;
    }
View Full Code Here

Examples of org.broadleafcommerce.core.catalog.service.CatalogService

    }

    @Override
    public int doStartTag() throws JspException {
        WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
        CatalogService catalogService = (CatalogService) applicationContext.getBean("blCatalogService");
        pageContext.setAttribute(var, catalogService.findProductById(productId));
        return EVAL_PAGE;
    }
View Full Code Here

Examples of org.broadleafcommerce.core.catalog.service.CatalogService

        this.active = category.isActive();
    }


    protected List<CategoryWrapper> buildSubcategoryTree(List<CategoryWrapper> wrappers, Category root, HttpServletRequest request) {
        CatalogService catalogService = (CatalogService) context.getBean("blCatalogService");

        Integer subcategoryLimit = (Integer) request.getAttribute("subcategoryLimit");
        Integer subcategoryOffset = (Integer) request.getAttribute("subcategoryOffset");

        List<Category> subcategories = catalogService.findActiveSubCategoriesByCategory(root, subcategoryLimit, subcategoryOffset);
        if (subcategories !=null && !subcategories.isEmpty() && wrappers == null) {
            wrappers = new ArrayList<CategoryWrapper>();
        }

        for (Category c : subcategories) {
View Full Code Here

Examples of org.fao.geonet.kernel.csw.CatalogService

      domainValues.addContent(pn.setText(paramName));
     
      String operationName = paramName.substring(0, paramName.indexOf('.'));
      String parameterName = paramName.substring(paramName.indexOf('.')+1);
     
      CatalogService cs = checkOperation(operationName);
      values = cs.retrieveValues(parameterName);
     
      // values null mean that the catalog was unable to determine
      // anything about the specified parameter
      if (values != null)
        domainValues.addContent(values);
View Full Code Here

Examples of org.fao.geonet.kernel.csw.CatalogService

  //---------------------------------------------------------------------------
 
  private CatalogService checkOperation(String operationName)
      throws CatalogException {

    CatalogService cs = springAppContext.getBean(CatalogService.BEAN_PREFIX+operationName, CatalogService.class);

    if (cs == null)
      throw new OperationNotSupportedEx(operationName);

    return cs;
View Full Code Here

Examples of org.fao.geonet.kernel.csw.CatalogService

    if (im == InputMethod.XML || im == InputMethod.SOAP)
    {
      String operation = request.getName();

      CatalogService cs = lookUpService(operation);

      if (cs == null)
        throw new OperationNotSupportedEx(operation);

      Log.info(Geonet.CSW, "Dispatching operation : "+ operation);

            if (cswServiceSpecificContraint != null){
        request.addContent(new Element(Geonet.Elem.FILTER).setText(cswServiceSpecificContraint));
      }

      return cs.execute(request, context);
    }

    else //--- GET or POST/www-encoded request
    {
      Map<String, String> params = extractParams(request);

      String operation = params.get("request");

      if (operation == null)
        throw new MissingParameterValueEx("request");

      CatalogService cs = lookUpService(operation);

      if (cs == null)
        throw new OperationNotSupportedEx(operation);

      request = cs.adaptGetRequest(params);

            if (cswServiceSpecificContraint != null){
        request.addContent(new Element(Geonet.Elem.FILTER).setText(cswServiceSpecificContraint));
      }

            if(context.isDebugEnabled())
                context.debug("Adapted GET request is:\n"+Xml.getString(request));
      context.info("Dispatching operation : "+ operation);

      return cs.execute(request, context);
    }
  }
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.