Examples of Result


Examples of org.apache.gora.query.Result

        } else {
            this.query.setStartTime(System.currentTimeMillis() - getDelay());
        }

        //proceed with query
        final Result result = query.execute();

        LOG.trace("Processing exchange [{}]...", exchange);

        try {

            getProcessor().process(exchange);
        } finally {

            if (exchange.getException() != null) {

                getExceptionHandler().handleException("Error processing exchange", exchange, exchange.getException());
            }
        }

        return Long.valueOf(result.getOffset()).intValue();
    }
View Full Code Here

Examples of org.apache.hadoop.cli.util.CommandExecutor.Result

     
      CLITestData testdata = (CLITestData) testsFromConfigFile.get(index);
  
      // Execute the test commands
      ArrayList<TestCmd> testCommands = testdata.getTestCommands();
      Result cmdResult = null;
      for (TestCmd cmd : testCommands) {
      try {
        cmdResult = execute(cmd);
      } catch (Exception e) {
        fail(StringUtils.stringifyException(e));
      }
      }
     
      boolean overallTCResult = true;
      // Run comparators
      ArrayList<ComparatorData> compdata = testdata.getComparatorData();
      for (ComparatorData cd : compdata) {
        final String comptype = cd.getComparatorType();
       
        boolean compareOutput = false;
       
        if (! comptype.equalsIgnoreCase("none")) {
          compareOutput = compareTestOutput(cd, cmdResult);
          overallTCResult &= compareOutput;
        }
       
        cd.setExitCode(cmdResult.getExitCode());
        cd.setActualOutput(cmdResult.getCommandOutput());
        cd.setTestResult(compareOutput);
      }
      testdata.setTestResult(overallTCResult);
     
      // Execute the cleanup commands
View Full Code Here

Examples of org.apache.hadoop.fs.shell.find.Result

public class TestResult extends TestExpression {

  @Test
  public void testPass() {
    Result result = Result.PASS;
    assertTrue(result.isPass());
    assertTrue(result.isDescend());
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Result

    // get assignment info and hregioninfo from meta.
    Get get = new Get(hi.getRegionName());
    get.addColumn(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER);
    get.addColumn(HConstants.CATALOG_FAMILY, HConstants.SERVER_QUALIFIER);
    get.addColumn(HConstants.CATALOG_FAMILY, HConstants.STARTCODE_QUALIFIER);
    Result r = meta.get(get);
    byte[] value = r.getValue(HConstants.CATALOG_FAMILY, HConstants.SERVER_QUALIFIER);
    byte[] startcodeBytes = r.getValue(HConstants.CATALOG_FAMILY, HConstants.STARTCODE_QUALIFIER);
    if (value == null || startcodeBytes == null) {
      errors.reportError("Unable to close region "
          + hi.getRegionNameAsString() " because meta does not "
          + "have handle to reach it.");
      return;
    }
    long startcode = Bytes.toLong(startcodeBytes);

    ServerName hsa = new ServerName(Bytes.toString(value), startcode);
    byte[] hriVal = r.getValue(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER);
    HRegionInfo hri= Writables.getHRegionInfoOrNull(hriVal);
    if (hri == null) {
      LOG.warn("Unable to close region " + hi.getRegionNameAsString()
          + " because META had invalid or missing "
          + HConstants.CATALOG_FAMILY_STR + ":"
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.NamenodeFsck.Result

     
      // Run the fsck and check the Result
      final HdfsFileStatus file =
          namenode.getRpcServer().getFileInfo(pathString);
      assertNotNull(file);
      Result res = new Result(conf);
      fsck.check(pathString, file, res);
      // Also print the output from the fsck, for ex post facto sanity checks
      System.out.println(result.toString());
      assertEquals(res.missingReplicas,
          (NUM_BLOCKS*REPL_FACTOR) - (NUM_BLOCKS*NUM_REPLICAS));
 
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.Result

    @Override
    public AccessControlPolicy[] getEffectivePolicies(@Nonnull Set<Principal> principals) throws RepositoryException {
        Util.checkValidPrincipals(principals, principalManager);
        Root r = getLatestRoot();

        Result aceResult = searchAces(principals, r);
        List<AccessControlPolicy> effective = new ArrayList<AccessControlPolicy>();
        for (ResultRow row : aceResult.getRows()) {
            String acePath = row.getPath();
            String aclName = Text.getName(Text.getRelativeParent(acePath, 1));

            Tree accessControlledTree = r.getTree(Text.getRelativeParent(acePath, 2));
            if (aclName.isEmpty() || !accessControlledTree.exists()) {
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.Result

    public QueryResult executeQuery(String statement, String language,
            HashMap<String, Value> bindVariableMap, long limit, long offset) throws RepositoryException {
        try {
            HashMap<String, CoreValue> bindMap = convertMap(bindVariableMap);
            Result r = qe.executeQuery(statement, convertLanguage(language), bindMap);
            return new QueryResultImpl(r);
        } catch (ParseException e) {
            throw new InvalidQueryException(e);
        }
    }
View Full Code Here

Examples of org.apache.juddi.datatype.response.Result

    if (vector!=null)
    {
      handler = maker.lookup(ResultHandler.TAG_NAME);
      for (int i=0; i < vector.size(); i++)
      {
        Result result = (Result)vector.elementAt(i);
        handler.marshal(result,element);
      }
    }

    parent.appendChild(element);
View Full Code Here

Examples of org.apache.oodt.xmlquery.Result

        String strVal = toString();
        if (strVal == null || (strVal != null && strVal.equals(""))) {
            return null;
        }

        Result r = new Result();
        r.setID(DateConvert.isoFormat(new Date()));
        r.setMimeType("text/plain");
        r.setResourceID("UNKNOWN");
        r.setValue(toString());
        return r;
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.Result

    private boolean initializeState(OpenJPAStateManager sm, PCState state,
        JDBCFetchConfiguration fetch, ConnectionInfo info)
        throws ClassNotFoundException, SQLException {
        Object oid = sm.getObjectId();
        ClassMapping mapping = (ClassMapping) sm.getMetaData();
        Result res = null;
        try {
            if (info != null && info.result != null) {
                res = info.result;
                info.sm = sm;
                if (info.mapping == null)
                    info.mapping = mapping;
                mapping = info.mapping;
            } else if (oid instanceof OpenJPAId
                && !((OpenJPAId) oid).hasSubclasses()) {
                Boolean custom = customLoad(sm, mapping, state, fetch);
                if (custom != null)
                    return custom.booleanValue();
                res = getInitializeStateResult(sm, mapping, fetch,
                    Select.SUBS_EXACT);
                if (res == null && !selectPrimaryKey(sm, mapping, fetch))
                    return false;
                if (res != null && !res.next())
                    return false;
            } else {
                ClassMapping[] mappings = mapping.
                    getIndependentAssignableMappings();
                if (mappings.length == 1) {
                    mapping = mappings[0];
                    Boolean custom = customLoad(sm, mapping, state, fetch);
                    if (custom != null)
                        return custom.booleanValue();
                    res = getInitializeStateResult(sm, mapping, fetch,
                        Select.SUBS_ANY_JOINABLE);
                    if (res == null && !selectPrimaryKey(sm, mapping, fetch))
                        return false;
                } else
                    res = getInitializeStateUnionResult(sm, mapping, mappings,
                        fetch);
                if (res != null && !res.next())
                    return false;
            }

            // figure out what type of object this is; the state manager
            // only guarantees to provide a base class
            Class type;
            if (res == null)
                type = mapping.getDescribedType();
            else {
                if (res.getBaseMapping() != null)
                    mapping = res.getBaseMapping();
                res.startDataRequest(mapping.getDiscriminator());
                try {
                    type = mapping.getDiscriminator().getClass(this, mapping,
                        res);
                } finally {
                    res.endDataRequest();
                }
            }

            // initialize the state manager; this may change the mapping
            // and the object id instance if the type as determined
            // from the indicator is a subclass of expected type
            sm.initialize(type, state);

            // load the selected mappings into the given state manager
            if (res != null) {
                // re-get the mapping in case the instance was a subclass
                mapping = (ClassMapping) sm.getMetaData();
                load(mapping, sm, fetch, res);
                mapping.getVersion().afterLoad(sm, this);
            }
            return true;
        } finally {
            if (res != null && (info == null || res != info.result))
                res.close();
        }
    }
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.