Examples of State


Examples of org.apache.hadoop.hbase.master.RegionState.State

   * @return True if specified region is in one of the specified states.
   */
  public synchronized boolean isRegionInState(
      final String regionName, final State... states) {
    RegionState regionState = getRegionState(regionName);
    State s = regionState != null ? regionState.getState() : null;
    for (State state: states) {
      if (s == state) return true;
    }
    return false;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.Statistics.State

        hasStats |= !isNull;
        hasNull |= isNull;
        if (hasNull && hasStats) break;
      }
    }
    State result = (hasStats
        ? (hasNull ? Statistics.State.PARTIAL : Statistics.State.COMPLETE)
        : (neededColumns.isEmpty() ? Statistics.State.COMPLETE : Statistics.State.NONE));
    return result;
  }
View Full Code Here

Examples of org.apache.hadoop.mapred.TaskStatus.State

      // Parse Mesos ID from extraData
      int mesosId = Integer.parseInt(task.extraData);
      if (activeMesosTasks.contains(mesosId)) {
        // Check whether the task has finished (either successfully or not),
        // and report to Mesos if it has
        State state = status.getRunState();
        TaskState mesosState = null;
        if (state == State.SUCCEEDED || state == State.COMMIT_PENDING)
          mesosState = TaskState.TASK_FINISHED;
        else if (state == State.FAILED || state == State.FAILED_UNCLEAN)
          mesosState = TaskState.TASK_FAILED;
View Full Code Here

Examples of org.apache.hadoop.mapreduce.JobStatus.State

  @Override
  public void abortVertex(VertexStatus.State finalState) throws IOException {
    if (!initialized) {
      throw new RuntimeException("Committer not initialized");
    }
    State jobState = getJobStateFromVertexStatusState(finalState);
    committer.abortJob(jobContext, jobState);
  }
View Full Code Here

Examples of org.apache.helix.api.State

      Map<ParticipantId, State> pendingStateMap =
          currStateOutput.getPendingStateMap(ResourceId.from(targetResource),
              PartitionId.from(partition));
      for (Map.Entry<ParticipantId, State> e : stateMap.entrySet()) {
        ParticipantId instanceName = e.getKey();
        State state = e.getValue();
        State pending = pendingStateMap.get(instanceName);
        if (pending != null) {
          continue;
        }
        if (targetStates == null || targetStates.isEmpty()
            || targetStates.contains(state.toString())) {
View Full Code Here

Examples of org.apache.http.nio.protocol.HttpAsyncRequestExecutor.State

        Mockito.when(this.exchangeHandler.generateRequest()).thenReturn(request);
        this.connContext.setAttribute(HttpAsyncRequestExecutor.HTTP_HANDLER, this.exchangeHandler);

        this.protocolHandler.connected(this.conn, null);

        final State state = (State) this.connContext.getAttribute(
                HttpAsyncRequestExecutor.HTTP_EXCHANGE_STATE);
        Assert.assertNotNull(state);
        Mockito.verify(this.exchangeHandler).generateRequest();
        Assert.assertSame(request, state.getRequest());
        Mockito.verify(this.conn).submitRequest(request);
        Mockito.verify(this.exchangeHandler).requestCompleted();
        Assert.assertEquals(MessageState.COMPLETED, state.getRequestState());
        Assert.assertEquals("request state: COMPLETED; request: GET / HTTP/1.1; " +
                "response state: READY; response: ; valid: true;", state.toString());
    }
View Full Code Here

Examples of org.apache.http.nio.protocol.HttpAsyncService.State

        Mockito.verify(this.conn, Mockito.never()).close();
    }

    @Test
    public void testResponseNotModified() throws Exception {
        final State state = new State();
        final HttpContext exchangeContext = new BasicHttpContext();
        final HttpRequest request = new BasicHttpRequest("HEAD", "/", HttpVersion.HTTP_1_1);
        final Incoming incoming = new Incoming(
                request, this.requestHandler, this.requestConsumer, exchangeContext);
        state.setIncoming(incoming);
        state.setRequestState(MessageState.COMPLETED);
        final HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1,
                HttpStatus.SC_NOT_MODIFIED, "Not modified");
        final Outgoing outgoing = new Outgoing(
                request, response, this.responseProducer, exchangeContext);
        state.setOutgoing(outgoing);
        state.setResponseState(MessageState.INIT);
        this.connContext.setAttribute(HttpAsyncService.HTTP_EXCHANGE_STATE, state);

        response.setEntity(new NStringEntity("stuff"));
        Mockito.when(this.responseProducer.generateResponse()).thenReturn(response);
        Mockito.when(this.reuseStrategy.keepAlive(response, exchangeContext)).thenReturn(Boolean.TRUE);

        this.protocolHandler.responseReady(this.conn);

        Assert.assertEquals(MessageState.READY, state.getResponseState());

        Mockito.verify(this.httpProcessor).process(response, exchangeContext);
        Mockito.verify(this.conn).submitResponse(response);
        Mockito.verify(this.responseProducer).responseCompleted(exchangeContext);
        Mockito.verify(this.conn).requestInput();
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.oid.Oid.State

     */
    public final RootOid createTransientOrViewModelOid(final Object pojo) {
        ObjectSpecification spec = getSpecificationLookup().loadSpecification(pojo.getClass());
        final ObjectSpecId objectSpecId = spec.getSpecId();
        final String transientIdentifier = identifierGenerator.createTransientIdentifierFor(objectSpecId, pojo);
        final State state = spec.containsFacet(ViewModelFacet.class)? State.VIEWMODEL:State.TRANSIENT;
        return new RootOidDefault(objectSpecId, transientIdentifier, state);
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.system.transaction.IsisTransaction.State

        if(transaction == null) {
            transactionManager.startTransaction();
            return;
        }

        final State state = transaction.getState();
        switch(state) {
            case COMMITTED:
            case ABORTED:
                transactionManager.startTransaction();
                break;
View Full Code Here

Examples of org.apache.lenya.cms.workflow.State

        throws ParserConfigurationException, SAXException, IOException, WorkflowBuildException {
           
        NamespaceHelper helper = new NamespaceHelper(NAMESPACE, DEFAULT_PREFIX, document);
       
        Element root = document.getDocumentElement();
        State initialState = null;
       
        Map states = new HashMap();
        Map events = new HashMap();
       
        // load states
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.