Examples of Warehouse


Examples of org.apache.hadoop.hive.metastore.Warehouse

              // allocate a temporary output dir on the location of the table
              String tableName = getUnescapedName((ASTNode)ast.getChild(0));
              Table newTable = db.newTable(tableName);
              Path location;
              try {
                Warehouse wh = new Warehouse(conf);
                location = wh.getDatabasePath(db.getDatabase(newTable.getDbName()));
              } catch (MetaException e) {
                throw new SemanticException(e);
              }
              try {
                fname = ctx.getExternalTmpFileURI(
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.Warehouse

              dumpTable = db.newTable(qb.getTableDesc().getTableName());
              if (!db.databaseExists(dumpTable.getDbName())) {
                throw new SemanticException("ERROR: The database " + dumpTable.getDbName()
                    + " does not exist.");
              }
              Warehouse wh = new Warehouse(conf);
              targetPath = wh.getTablePath(db.getDatabase(dumpTable.getDbName()), dumpTable
                  .getTableName());
            } catch (HiveException e) {
              throw new SemanticException(e);
            } catch (MetaException e) {
              throw new SemanticException(e);
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.Warehouse

    StatsAggregator statsAggregator = null;
    int ret = 0;

    try {
      // Stats setup:
      Warehouse wh = new Warehouse(conf);
      FileSystem fileSys;
      FileStatus[] fileStatus;

      if (!this.getWork().getNoStatsAggregator()) {
        String statsImplementationClass = HiveConf.getVar(conf, HiveConf.ConfVars.HIVESTATSDBCLASS);
        StatsFactory.setImplementation(statsImplementationClass, conf);
        statsAggregator = StatsFactory.getStatsAggregator();
        // manufacture a StatsAggregator
        if (!statsAggregator.connect(conf)) {
          throw new HiveException("StatsAggregator connect failed " + statsImplementationClass);
        }
      }

      TableStatistics tblStats = new TableStatistics();

      org.apache.hadoop.hive.metastore.api.Table tTable = table.getTTable();
      Map<String, String> parameters = tTable.getParameters();

      boolean tableStatsExist = this.existStats(parameters);

      for (String statType : supportedStats) {
        if (parameters.containsKey(statType)) {
          tblStats.setStat(statType, Long.parseLong(parameters.get(statType)));
        }
      }

      if (parameters.containsKey(StatsSetupConst.NUM_PARTITIONS)) {
        tblStats.setNumPartitions(Integer.parseInt(parameters.get(StatsSetupConst.NUM_PARTITIONS)));
      }

      List<Partition> partitions = getPartitionsList();
      boolean atomic = HiveConf.getBoolVar(conf, HiveConf.ConfVars.HIVE_STATS_ATOMIC);

      if (partitions == null) {
        // non-partitioned tables:
        if (!tableStatsExist && atomic) {
          return 0;
        }
        Path tablePath = wh.getTablePath(db.getDatabase(table.getDbName()), table.getTableName());
        fileSys = tablePath.getFileSystem(conf);
        fileStatus = Utilities.getFileStatusRecurse(tablePath, 1, fileSys);

        tblStats.setStat(StatsSetupConst.NUM_FILES, fileStatus.length);
        long tableSize = 0L;
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.Warehouse

    }
  }

  private void deleteDir(Path dir) throws HiveException {
    try {
      Warehouse wh = new Warehouse(conf);
      wh.deleteDir(dir, true);
    } catch (MetaException e) {
      throw new HiveException(e);
    }
  }
View Full Code Here

Examples of org.blueoxygen.postila.entity.Warehouse

            model.removeRow(0);
        }

        if(!list.isEmpty()){
            for(Object ob : list){
                Warehouse c = (Warehouse) ob;
                model.addRow(new Object[]{c.getCode(), c.getName(), c.getAddress(), c.getDescription()});
            }
        }
  }
View Full Code Here

Examples of org.blueoxygen.postila.materialmanagement.materialmanagementrules.entity.Warehouse

   
    if(hasErrors()){
      return INPUT;
    }
   
    Warehouse warehouse;
    if(getWarehouse().getId() == null || "".equalsIgnoreCase(getWarehouse().getId())){
      warehouse = new Warehouse();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    } else {
      warehouse = (Warehouse) manager.getById(Warehouse.class, getWarehouse().getId());
      logInfo = warehouse.getLogInformation();
    }
   
    logInfo.setActiveFlag(getActive());
    logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    warehouse.setLogInformation(logInfo);
    warehouse.setSearchKey(getWarehouse().getSearchKey());
    warehouse.setName(getWarehouse().getName());
    warehouse.setDescription(getWarehouse().getDescription());
    warehouse.setInTransit(getWarehouse().getInTransit());
    warehouse.setAddress(getAddress());
    warehouse.setSourceWarehouse(getSourceWarehouse());
    warehouse.setReplenishmentClass(getWarehouse().getReplenishmentClass());
   
    manager.save(warehouse);
    setWarehouse(warehouse);
    return SUCCESS;
  }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Warehouse

        Criteria criteria = createDefaultCriteria(Warehouse.class);

        FetchPlan fetchPlan = handleSpecificFetchMode(criteria, params);

        criteria.add(Restrictions.eq("id", warehouseId));
        Warehouse warehouse = (Warehouse) criteria.uniqueResult();
        if(warehouse != null){
            warehouse.setFetchPlan(fetchPlan);
        }
        return warehouse;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Warehouse

        Criteria criteria = createDefaultCriteria(Warehouse.class);

        FetchPlan fetchPlan = handleSpecificFetchMode(criteria, params);

        criteria.add(Restrictions.eq("code", handleCodeValue(warehouseCode)));
        Warehouse warehouse = (Warehouse) criteria.uniqueResult();
        if(warehouse != null){
            warehouse.setFetchPlan(fetchPlan);
        }
        return warehouse;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Warehouse

        if (warehouse.getId() != null) {
            if (em.contains(warehouse)) {
                em.refresh(warehouse);
            }
            Warehouse mergedWarehouse = em.merge(warehouse);
            em.flush();
            return mergedWarehouse;
        } else {
            em.persist(warehouse);
            return warehouse;
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Warehouse

    }
   
        final List<WarehouseViewBean> warehouseViewBeans = new ArrayList<WarehouseViewBean>();
        final List<Warehouse> warehouses = warehouseService.findWarehousesByDeliveryMethodId(deliveryMethod.getId());
        for (Iterator<Warehouse> iterator = warehouses.iterator(); iterator.hasNext();) {
            Warehouse warehouse = (Warehouse) iterator.next();
            warehouseViewBeans.add(backofficeViewBeanFactory.buildViewBeanWarehouse(requestUtil.getRequestData(request), warehouse));
        }
        request.setAttribute(ModelConstants.WAREHOUSES_VIEW_BEAN, warehouseViewBeans);
       
        model.addAttribute(ModelConstants.URL_BACK, backofficeUrlService.generateUrl(BoUrls.DELIVERY_METHOD_LIST, requestData));
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.