Examples of QueueName


Examples of co.cask.cdap.common.queue.QueueName

      AggregatesScanResult scanResult = scanner.next();
      processed += scanResult.getValue();
      // tag is of the form input.[queueURI].  ex: input.queue://PurchaseFlow/reader/queue
      String tag = scanResult.getTag();
      // strip the preceding "input." from the tag.
      QueueName queueName = QueueName.from(URI.create(tag.substring(6, tag.length())));
      if (queueName.isStream()) {
        streamNames.add(queueName.getSimpleName());
      } else if (queueName.isQueue()) {
        String context = String.format("%s.f.%s.%s",
                                       queueName.getFirstComponent(), // the app
                                       queueName.getSecondComponent(), // the flow
                                       queueName.getThirdComponent()); // the flowlet
        queueNameContexts.add(new ImmutablePair<String, String>(queueName.getSimpleName(), context));
      } else {
        LOG.warn("unknown type of queue name {} ", queueName.toString());
      }
    }

    // For each queue, get the enqueue aggregate
    long enqueue = 0;
View Full Code Here

Examples of co.cask.tigon.data.queue.QueueName

          currentQueue = null;
        }

        // This row is a queue entry. If currentQueue is null, meaning it's a new queue encountered during scan.
        if (currentQueue == null) {
          QueueName queueName = QueueEntryRow.getQueueName(appName, flowName, keyValue);
          currentQueue = queueName.toBytes();
          currentQueueRowPrefix = QueueEntryRow.getQueueRowPrefix(queueName);
          consumerConfig = configCache.getConsumerConfig(currentQueue);
        }

        if (consumerConfig == null) {
View Full Code Here

Examples of co.cask.tigon.data.queue.QueueName

                                             Tick tickAnnotation) {
        List<QueueReader<T>> queueReaders = Lists.newLinkedList();

        for (Map.Entry<Node, Set<QueueSpecification>> entry : queueSpecs.column(flowletName).entrySet()) {
          for (QueueSpecification queueSpec : entry.getValue()) {
            final QueueName queueName = queueSpec.getQueueName();

            if (queueSpec.getInputSchema().equals(schema)
              && (inputNames.contains(queueName.getSimpleName())
              || inputNames.contains(FlowletDefinition.ANY_INPUT))) {

                int numGroups = getNumGroups(Iterables.concat(queueSpecs.row(entry.getKey()).values()), queueName);
                Function<ByteBuffer, T> decoder =
                  wrapInputDecoder(flowletContext, queueName, createInputDatumDecoder(dataType, schema, schemaCache));
View Full Code Here

Examples of co.cask.tigon.data.queue.QueueName

   */
  private Service createServiceHook(String flowletName, Iterable<ConsumerSupplier<?>> consumerSuppliers,
                                    AtomicReference<FlowletProgramController> controller) {
    final List<String> streams = Lists.newArrayList();
    for (ConsumerSupplier<?> consumerSupplier : consumerSuppliers) {
      QueueName queueName = consumerSupplier.getQueueName();
      if (queueName.isStream()) {
        streams.add(queueName.getSimpleName());
      }
    }

    // If no stream, returns a no-op Service
    if (streams.isEmpty()) {
View Full Code Here

Examples of co.cask.tigon.data.queue.QueueName

          currentQueue = null;
        }

        // This row is a queue entry. If currentQueue is null, meaning it's a new queue encountered during scan.
        if (currentQueue == null) {
          QueueName queueName = QueueEntryRow.getQueueName(
              appName, flowName, cell.getRowArray(), cell.getRowOffset(), cell.getRowLength());
          currentQueue = queueName.toBytes();
          currentQueueRowPrefix = QueueEntryRow.getQueueRowPrefix(queueName);
          consumerConfig = configCache.getConsumerConfig(currentQueue);
        }

        if (consumerConfig == null) {
View Full Code Here

Examples of co.cask.tigon.data.queue.QueueName

    create(QueueName.from(URI.create(name)));
  }

  @Override
  public void truncate(String name) throws Exception {
    QueueName queueName = QueueName.from(URI.create(name));
    // all queues for one flow are stored in same table, and we would clear all of them. this makes it optional.
    if (doTruncateTable(queueName)) {
      byte[] tableNameBytes = Bytes.toBytes(getActualTableName(queueName));
      truncate(tableNameBytes);
    } else {
View Full Code Here

Examples of co.cask.tigon.data.queue.QueueName

    deleteConsumerConfigurations(app, flow);
  }

  @Override
  public void drop(String name) throws Exception {
    QueueName queueName = QueueName.from(URI.create(name));
    // all queues for one flow are stored in same table, and we would drop all of them. this makes it optional.
    if (doDropTable(queueName)) {
      byte[] tableNameBytes = Bytes.toBytes(getActualTableName(queueName));
      drop(tableNameBytes);
    } else {
View Full Code Here

Examples of co.cask.tigon.data.queue.QueueName

    deleteConsumerConfigurations(queueName);
  }

  @Override
  public void upgrade(String name, Properties properties) throws Exception {
    QueueName queueName = QueueName.from(URI.create(name));
    String hBaseTableName = getActualTableName(queueName);
    AbstractHBaseDataSetAdmin dsAdmin = new DatasetAdmin(hBaseTableName, hConf, tableUtil);
    try {
      dsAdmin.upgrade();
    } finally {
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.