Examples of sequence()


Examples of com.foundationdb.ais.model.AISBuilder.sequence()

                maxValue = Integer.MAX_VALUE;
            }
            // else keep long max
        }
        AISBuilder builder = new AISBuilder();
        builder.sequence(seqName.getSchemaName(), seqName.getTableName(), startWith, incBy, minValue, maxValue, isCycle);
        Sequence sequence = builder.akibanInformationSchema().getSequence(seqName);
        if (node.getStorageFormat() != null) {
            TableDDL.setStorage(ddlFunctions, sequence, node.getStorageFormat());
        }
        ddlFunctions.createSequence(session, sequence);
View Full Code Here

Examples of com.foundationdb.ais.model.TestAISBuilder.sequence()

        }
        {
        /* Sequence testing */
        String schema = "test";
        String sequence = "sequence";
        builder.sequence(schema, sequence, 1, 1, 0, 1000, false);
        sequence = sequence + "1";
        builder.sequence(schema, sequence, 1000, -1, 0, 1000, false);
       
        String table = "seq-table";
        sequence = "_col_sequence";
View Full Code Here

Examples of com.foundationdb.ais.model.aisb2.NewAISBuilder.sequence()

    @Test
    public void sequenceSimple () {
        TableName seqName = new TableName (SCHEMA, "Sequence-1");
        NewAISBuilder builder = AISBBasedBuilder.create(typesTranslator());
        builder.defaultSchema(SCHEMA);
        builder.sequence(seqName.getTableName());
        AkibanInformationSchema inAIS = builder.ais();
        AkibanInformationSchema outAIS = writeAndRead(inAIS);
        assertNotNull(outAIS.getSequence(new TableName(SCHEMA, "Sequence-1")));
        Sequence sequence = outAIS.getSequence(new TableName(SCHEMA, "Sequence-1"));
        assertEquals(1, sequence.getStartsWith());
View Full Code Here

Examples of com.googlecode.gaal.data.impl.TreeMapCorpus.sequence()

        // String[] alphabet = { null, "a", "c", "g", "t", "#" };

        Tokenizer<String> tokenizer = new RegexTokenizer(sr, "[\\W\\w]", new LowerCaseNormalizer());
        Corpus<String> corpus = new TreeMapCorpus(tokenizer, alphabet);
        System.out.println("alphabet size " + corpus.alphabetSize());
        System.out.println("text size " + corpus.sequence().size());
        System.out.println("text " + corpus.sequence());
        System.out.println("alphabet " + corpus.alphabet());
        Iterator<String> iter = corpus.iterator(corpus.sequence());
        while (iter.hasNext())
            System.out.print(iter.next());
View Full Code Here

Examples of com.linkedin.databus.core.DbusEventInternalReadable.sequence()

      if (traceEnabled) _log.trace("Got event:" + nextEvent);
      Long eventSrcId = (long)nextEvent.srcId();
      if (curState.isSCNRegress())
      {
        SingleSourceSCN scn = new SingleSourceSCN(nextEvent.physicalPartitionId(),
                                                  nextEvent.sequence());
        _log.info("We are regressing to SCN: " + scn);
        curState.switchToRollback();
        doRollback(curState, scn, false, false);
        curState.setSCNRegress(false);
        curState.switchToExpectEventWindow();
View Full Code Here

Examples of com.linkedin.databus.core.DbusEventInternalReadable.sequence()

        curState.switchToExpectEventWindow();
      }

      if (null != getAsyncCallback().getStats())
        getAsyncCallback().getStats().registerWindowSeen(nextEvent.timestampInNanos(),
                                                         nextEvent.sequence());

      if (nextEvent.isControlMessage())
      {
      //control event
        if (nextEvent.isEndOfPeriodMarker())
View Full Code Here

Examples of com.linkedin.databus.core.DbusEventInternalReadable.sequence()

            }

            SCN endWinScn = null;
            if (success)
            {
              _lastWindowScn = nextEvent.sequence();
              _lastEowTsNsecs = nextEvent.timestampInNanos();
              endWinScn = new SingleSourceSCN(nextEvent.physicalPartitionId(),
                                              _lastWindowScn);
              curState.switchToEndStreamEventWindow(endWinScn);
              success = doEndStreamEventWindow(curState);
View Full Code Here

Examples of com.linkedin.databus.core.DbusEventInternalReadable.sequence()

          {
            //empty window
            success = true;
            if (_log.isDebugEnabled())
            {
              _log.debug("skipping empty window: " + nextEvent.sequence());
            }

            //write a checkpoint; takes care of slow sources ; but skip storing the first control eop with 0 scn
            if (nextEvent.sequence() > 0)
            {
View Full Code Here

Examples of com.linkedin.databus.core.DbusEventInternalReadable.sequence()

            {
              _log.debug("skipping empty window: " + nextEvent.sequence());
            }

            //write a checkpoint; takes care of slow sources ; but skip storing the first control eop with 0 scn
            if (nextEvent.sequence() > 0)
            {
                _lastWindowScn = nextEvent.sequence();
                //the first window (startEvents()) can have a eop whose sequence() is non-zero but timestamp 0 e.g. in chained relay .
                //The reason is that the eop's timestamp is the max timestamp of all data events seen so far.
                if (nextEvent.timestampInNanos() > 0)
View Full Code Here

Examples of com.linkedin.databus.core.DbusEventInternalReadable.sequence()

            }

            //write a checkpoint; takes care of slow sources ; but skip storing the first control eop with 0 scn
            if (nextEvent.sequence() > 0)
            {
                _lastWindowScn = nextEvent.sequence();
                //the first window (startEvents()) can have a eop whose sequence() is non-zero but timestamp 0 e.g. in chained relay .
                //The reason is that the eop's timestamp is the max timestamp of all data events seen so far.
                if (nextEvent.timestampInNanos() > 0)
                {
                  _lastEowTsNsecs = nextEvent.timestampInNanos();
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.