Package com.datastax.driver.core

Examples of com.datastax.driver.core.Row


      final Iterator<Row> it = cassandraResultList.iterator();
      // Iterate over all results and create fresh EventBean for all
      // data results from the database query.
      while (it.hasNext()) {
        final Row cassandraRow = it.next();
        esperResultSet.add(_eventFactory.wrap(rowVisitor
            .visitRow(cassandraRow)));
      }
    } catch (Exception e) {
      if (!_log.isDebugEnabled()) {
View Full Code Here


  @Override
  public EventBean next() {
    if (!hasNext()) {
      throw new NoSuchElementException();
    } else {
      final Row cassandraRow = _it.next();
      return _eventBeanFactory.wrap(_rowVisitor.visitRow(cassandraRow));
    }
  }
View Full Code Here

        protected Pair<Long, Row> computeNext()
        {
            if (rows == null || !rows.hasNext())
                return endOfData();

            Row row = rows.next();
            Map<String, ByteBuffer> keyColumns = new HashMap<String, ByteBuffer>();
            for (String column : partitionBoundColumns.keySet())
                keyColumns.put(column, row.getBytesUnsafe(column));

            // increase total CF row read
            if (previousRowKey.isEmpty() && !keyColumns.isEmpty())
            {
                previousRowKey = keyColumns;
View Full Code Here

      return;
    }

    if (moreResultsInShard) {
      // If we are within a shard already, get more results from this shard
      Row row = page.get(nextItem);
      UUID uuid = row.getUUID("id");
      statementIterator.setNextUuid(uuid);
      CQLStatement cql = statementIterator.next();
      ResultSet resultSet = cqlExecutor.executeSync(cql);
      statementNumber++;
      populatePage(resultSet);
View Full Code Here

        item.add(new Label("rowName", EMPTYVAL));
      }

      @Override
      protected void populateItem(Item<Row> item) {
        Row row = item.getModel().getObject();
        displayedRows.add(row);
        Component component = createRowKeyColumn("rowName", row, metadataModel);
        item.add(component);
      }
    };
View Full Code Here

        ListView<Row> columnValueList = new ListView<Row>("columnValueList", rowsModel) {

          @Override
          protected void populateItem(ListItem<Row> item) {
            Row row = item.getModelObject();

            Component component = widgetFactory.createForColumn(row, partitionKey, columnName,
                "columnValue");
            item.add(component);
            component.setRenderBodyOnly(true);
View Full Code Here

      protected void populateEmptyItem(Item<Row> item) {
      }

      @Override
      protected void populateItem(Item<Row> item) {
        Row row = item.getModel().getObject();
        Component rowKey = createRowKeyColumn("rowKey", row, metadataModel);
        item.add(rowKey);

        ListView<CqlExtendedColumnName> columnValueList = new ListView<CqlExtendedColumnName>(
            "columnValueList", columnsModel) {
View Full Code Here

    if (cqlResult == null || cqlResult.isExhausted()) {
      return CqlQueryResult.EMPTY;
    }

    Map<String, CqlColumnType> typeMap = createTypeMap(query);
    Row firstRow = cqlResult.one();
    CqlRowMetadata rowMetadata = extractRowMetadata(firstRow, typeMap);

    RowIterator rowIterator = new RowIterator(cqlResult.iterator(), firstRow);
    CqlQueryResult result = new CqlQueryResult(rowIterator, rowMetadata);
    return result;
View Full Code Here

      return has;
    }

    @Override
    public Row next() {
      Row next = read == 0 ? firstRow : wrapped.next();

      if (next != null) {
        read++;
      }
      return next;
View Full Code Here

                    List<Row> rows = result.all();

                    ByteBuffer[][] r = new ByteBuffer[rows.size()][];
                    for (int i = 0 ; i < r.length ; i++)
                    {
                        Row row = rows.get(i);
                        r[i] = new ByteBuffer[row.getColumnDefinitions().size()];
                        for (int j = 0 ; j < row.getColumnDefinitions().size() ; j++)
                            r[i][j] = row.getBytes(j);
                    }
                    return r;
                }
            };
        }
View Full Code Here

TOP

Related Classes of com.datastax.driver.core.Row

Copyright © 2018 www.massapicom. 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.