Deserialize only Keyspace attributes without nested ColumnFamilies

@param row Keyspace attributes in serialized form

@return deserialized keyspace without cf_defs
181531
public static KSMetaData fromSchema(Row row, Iterable<CFMetaData> cfms, UTMetaData userTypes)
    {
        UntypedResultSet.Row result = QueryProcessor.resultify("SELECT * FROM system.schema_keyspaces", row).one();
        try
        {
            return new KSMetaData(result.getString("keyspace_name"),
                                  AbstractReplicationStrategy.getClass(result.getString("strategy_class")),
                                  fromJsonMap(result.getString("strategy_options")),
                                  result.getBoolean("durable_writes"),
                                  cfms,
                                  userTypes);
        }
        catch (ConfigurationException e)
        {
            throw new RuntimeException(e);
        }
    }
1086762
BlockLeaf toSorted(Row row)
  {
    if (_rowHead == BLOCK_SIZE) {
      return this;
    }
    
    int keyLength = row.keyLength();
    int keyOffset = row.keyOffset();
    int rowLength = row.length();
    
    _rowSortHead = _rowHead;
    
    _keyMinSort = new byte[row.keyLength()];
    _keyMaxSort = new byte[row.keyLength()];
    
    System.arraycopy(_buffer, _rowSortHead + keyOffset,
                     _keyMaxSort, 0, 
                     keyLength);
    
    System.arraycopy(_buffer, BLOCK_SIZE - rowLength + keyOffset,
                     _keyMinSort, 0, 
                     keyLength);
    
                       
    return this;
  }
372089
private static int skipWhiteSpace(BitArray row) throws NotFoundException {
    int width = row.getSize();
    int endStart = row.getNextSet(0);
    if (endStart == width) {
      throw NotFoundException.getNotFoundInstance();
    }

    return endStart;
  }
499101
public static List<Writable> rowToWritables(Schema schema, Row row) {
        List<Writable> ret = new ArrayList<>();
        for (int i = 0; i < row.size(); i++) {
            switch (schema.getType(i)) {
                case Double:
                    ret.add(new DoubleWritable(row.getDouble(i)));
                    break;
                case Float:
                    ret.add(new FloatWritable(row.getFloat(i)));
                    break;
                case Integer:
                    ret.add(new IntWritable(row.getInt(i)));
                    break;
                case Long:
                    ret.add(new LongWritable(row.getLong(i)));
                    break;
                case String:
                    ret.add(new Text(row.getString(i)));
                    break;
                default:
                    throw new IllegalStateException("Illegal type");
            }
        }
        return ret;
    }
623946
@Override
  public Map<Column, Bytes> get(Bytes row, Set<Column> columns) {
    Map<Column, Bytes> colVal = txb.get(row, columns);
    for (Map.Entry<Column, Bytes> entry : colVal.entrySet()) {
      txLog.filteredAdd(LogEntry.newGet(row, entry.getKey(), entry.getValue()), filter);
    }
    return colVal;
  }
556312
protected String getRowKeyValueAsString(final Object key) {
        final String result = key.toString();
        return "r_" + StringUtils.deleteWhitespace(result);
    }
52713
public static ByteMap<byte[]> getTagUids(final byte[] row) {
    final ByteMap<byte[]> uids = new ByteMap<byte[]>();
    final short name_width = TSDB.tagk_width();
    final short value_width = TSDB.tagv_width();
    final short tag_bytes = (short) (name_width + value_width);
    final short metric_ts_bytes = (short) (TSDB.metrics_width()
                                           + Const.TIMESTAMP_BYTES
                                           + Const.SALT_WIDTH());

    for (short pos = metric_ts_bytes; pos < row.length; pos += tag_bytes) {
      final byte[] tmp_name = new byte[name_width];
      final byte[] tmp_value = new byte[value_width];
      System.arraycopy(row, pos, tmp_name, 0, name_width);
      System.arraycopy(row, pos + name_width, tmp_value, 0, value_width);
      uids.put(tmp_name, tmp_value);
    }
    return uids;
  }
1129932
public int getSize(Row row) {

        Object[] data  = row.getData();
        Type[]   types = row.getTable().getColumnTypes();
        int      cols  = row.getTable().getDataColumnCount();

        return INT_STORE_SIZE + getSize(data, cols, types);
    }
895461
public final DoubleProperty rowSpacingProperty() {
        if (rowSpacing == null) {
            rowSpacing = new StyleableDoubleProperty(2) {

                @Override
                public CssMetaData<AllDayView, Number> getCssMetaData() {
                    return StyleableProperties.ROW_SPACING;
                }

                @Override
                public Object getBean() {
                    return AllDayView.this;
                }

                @Override
                public String getName() {
                    return "rowSpacing"; //$NON-NLS-1$
                }
            };
        }

        return rowSpacing;
    }
1333047
public Vector4f getRow(int row, Vector4f dest) throws IndexOutOfBoundsException {
        switch (row) {
        case 0:
            dest.x = m00;
            dest.y = m10;
            dest.z = m20;
            dest.w = m30;
            break;
        case 1:
            dest.x = m01;
            dest.y = m11;
            dest.z = m21;
            dest.w = m31;
            break;
        case 2:
            dest.x = m02;
            dest.y = m12;
            dest.z = m22;
            dest.w = m32;
            break;
        case 3:
            dest.x = m03;
            dest.y = m13;
            dest.z = m23;
            dest.w = m33;
            break;
        default:
            throw new IndexOutOfBoundsException();
        }
        return dest;
    }
290433
public <K> Map<K, String> getMulti(Serializer<K> keySerializer, K... keys) {
    MultigetSliceQuery<K, String,String> q = createMultigetSliceQuery(keyspace, keySerializer, serializer, serializer);
    q.setColumnFamily(CF_NAME);
    q.setKeys(keys);
    q.setColumnNames(COLUMN_NAME);

    QueryResult<Rows<K, String,String>> r = q.execute();
    Rows<K, String,String> rows = r.get();
    Map<K, String> ret = new HashMap<K, String>(keys.length);
    for (K k: keys) {
      HColumn<String,String> c = rows.getByKey(k).getColumnSlice().getColumnByName(COLUMN_NAME);
      if (c != null && c.getValue() != null) {
        ret.put(k, c.getValue());
      }
    }
    return ret;
  }
816424
public String getCell(String row, String col) throws Exception {
		if (col.equals(this.getIndexColumnName())) {
			return row;
		}
		HeaderInfo rowIndex = rowLookup.get(row);
		HeaderInfo colIndex = columnLookup.get(col);

		if (rowIndex == null) {
			//allow for case insentive search
			for (String rowtable : rowLookup.keySet()) {
				if (row.equalsIgnoreCase(rowtable)) {
					rowIndex = rowLookup.get(rowtable);
					break;
				}
			}
			if (rowIndex == null) {
				throw new Exception("Row " + row + " not found in worksheet");
			}
		}
		if (colIndex == null) {
			//allow for case insentive search
			for (String coltable : columnLookup.keySet()) {
				if (col.equalsIgnoreCase(coltable)) {
					colIndex = columnLookup.get(coltable);
					break;
				}
			}
			if (colIndex == null) {
				throw new Exception("Column " + col + " not found in worksheet");
			}
		}

		CompactCharSequence ccs = data[rowIndex.getIndex()][colIndex.getIndex()];
		if (ccs != null) {
			return ccs.toString();
		} else {
			return "";
		}

		// return .toString();
	}
1014012
protected void addRow(final KeyValue row) {
    long last_ts = 0;
    if (rows.size() != 0) {
      // Verify that we have the same metric id and tags.
      final byte[] key = row.key();
      final iRowSeq last = rows.get(rows.size() - 1);
      final short metric_width = tsdb.metrics.width();
      final short tags_offset = 
          (short) (Const.SALT_WIDTH() + metric_width + Const.TIMESTAMP_BYTES);
      final short tags_bytes = (short) (key.length - tags_offset);
      String error = null;
      if (key.length != last.key().length) {
        error = "row key length mismatch";
      } else if (
          Bytes.memcmp(key, last.key(), Const.SALT_WIDTH(), metric_width) != 0) {
        error = "metric ID mismatch";
      } else if (Bytes.memcmp(key, last.key(), tags_offset, tags_bytes) != 0) {
        error = "tags mismatch";
      }
      if (error != null) {
        throw new IllegalArgumentException(error + ". "
            + "This Span's last row key is " + Arrays.toString(last.key())
            + " whereas the row key being added is " + Arrays.toString(key)
            + " and metric_width=" + metric_width);
      }
      last_ts = last.timestamp(last.size() - 1);  // O(n)
    }

    final RowSeq rowseq = new RowSeq(tsdb);
    rowseq.setRow(row);
    sorted = false;
    if (last_ts >= rowseq.timestamp(0)) {
      // scan to see if we need to merge into an existing row
      for (final iRowSeq rs : rows) {
        if (Bytes.memcmp(rs.key(), row.key(), Const.SALT_WIDTH(), 
            (rs.key().length - Const.SALT_WIDTH())) == 0) {
          rs.addRow(row);
          return;
        }
      }
    }
    
    rows.add(rowseq);
  }
102072
public static List<Integer> rowIndexStringToList(final String row) {
		if (row == null) {
			return null;
		}

		List<Integer> rowIndex = new ArrayList<>();

		try {

			// Convert StringId to array
			String[] rowIdString = row.split(INDEX_DELIMITER);
			for (int i = 0; i < rowIdString.length; i++) {
				rowIndex.add(Integer.parseInt(rowIdString[i]));
			}
		} catch (NumberFormatException e) {
			LOG.warn("Invalid row id: " + row);
		}

		return rowIndex;
	}
1131873
@NonNull
  public static Drop dropKeyspace(@NonNull String keyspaceName) {
    return dropKeyspace(CqlIdentifier.fromCql(keyspaceName));
  }
1009947
private void dropKeyspaceOrCFs() throws InvalidRequestException, SchemaDisagreementException, TException, Exception
    {
        if (createdKeyspaces.contains(databaseName))// drop if created during
                                                    // create-drop call.
        {
            cassandra_client.system_drop_keyspace(databaseName);
        }
        else
        {
            cassandra_client.set_keyspace(databaseName);
            for (TableInfo tableInfo : tableInfos)
            {
                dropColumnFamily(tableInfo);
            }
        }
    }
313183
public TypedDataSet<T> rows(Collection<? extends T> rows) {
    for (T rowObj : rows) {
      super.row(conv.convert(rowObj));
    }
    return this;
  }