Examples of addColumn()


Examples of org.apache.hadoop.hbase.client.HBaseAdmin.addColumn()

    // preModifyTable can't bypass default action.
    assertTrue("Test table should have been modified",
      cp.wasModifyTableCalled());

    // add a column family
    admin.addColumn(TEST_TABLE, new HColumnDescriptor(TEST_FAMILY2));
    assertTrue("New column family shouldn't have been added to test table",
      cp.preAddColumnCalledOnly());

    // modify a column family
    HColumnDescriptor hcd1 = new HColumnDescriptor(TEST_FAMILY2);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Increment.addColumn()

    @Override
    public List<Increment> getIncrements(){
      List<Increment> incs = new LinkedList<Increment>();
      if(incCol != null) {
        Increment inc = new Increment(incrementRow);
        inc.addColumn(cf, incCol, 1);
        incs.add(inc);
      }
      return incs;
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Scan.addColumn()

          for(ByteBuffer column : tScan.getColumns()) {
            byte [][] famQf = KeyValue.parseColumn(getBytes(column));
            if(famQf.length == 1) {
              scan.addFamily(famQf[0]);
            } else {
              scan.addColumn(famQf[0], famQf[1]);
            }
          }
        }
        if (tScan.isSetFilterString()) {
          ParseFilter parseFilter = new ParseFilter();
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.model.ScannerModel.addColumn()

  public void testSimpleScannerXML() throws IOException, JAXBException {
    final int BATCH_SIZE = 5;
    // new scanner
    ScannerModel model = new ScannerModel();
    model.setBatch(BATCH_SIZE);
    model.addColumn(Bytes.toBytes(COLUMN_1));
    StringWriter writer = new StringWriter();
    marshaller.marshal(model, writer);
    byte[] body = Bytes.toBytes(writer.toString());

    // test put operation is forbidden in read-only mode
View Full Code Here

Examples of org.apache.hadoop.hbase.stargate.model.ScannerModel.addColumn()

  public void testSimpleScannerBinary() throws IOException {
    // new scanner
    ScannerModel model = new ScannerModel();
    model.setBatch(1);
    model.addColumn(Bytes.toBytes(COLUMN_1));
    Response response = client.put("/" + TABLE + "/scanner",
      MIMETYPE_PROTOBUF, model.createProtobufOutput());
    assertEquals(response.getCode(), 201);
    String scannerURI = response.getLocation();
    assertNotNull(scannerURI);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.ExprNodeColumnListDesc.addColumn()

            throw new SemanticException(ErrorMsg.INVALID_TABLE_ALIAS.getMsg(child));
          }
          for (Map.Entry<String, ColumnInfo> colMap : columns.entrySet()) {
            ColumnInfo colInfo = colMap.getValue();
            if (!colInfo.getIsVirtualCol()) {
              columnList.addColumn(new ExprNodeColumnDesc(colInfo.getType(),
                  colInfo.getInternalName(), colInfo.getTabAlias(), false));
            }
          }
        } else {
          // all columns (select *, for example)
View Full Code Here

Examples of org.apache.metamodel.schema.MutableTable.addColumn()

                sequence.next();
            }

            for (int j = offset; j < row.getLastCellNum(); j++) {
                Column column = new MutableColumn(sequence.next(), ColumnType.STRING, table, j, true);
                table.addColumn(column);
            }
        } else {

            boolean hasColumns = true;
View Full Code Here

Examples of org.apache.ojb.broker.metadata.torque.TableDescriptor.addColumn()

        buffer = new StringBuffer();
        tableDescriptor.setName("PERSON_PROJECT");
        ClassDescriptor classDescriptor = this.repository.getDescriptorFor(org.apache.ojb.odmg.shared.ProductGroup.class);
        FieldDescriptor fieldDescriptors[] = classDescriptor.getFieldDescriptions();
        for (int i = 0; i < fieldDescriptors.length; i++) {
            tableDescriptor.addColumn(fieldDescriptors[i]);
        }
        tableDescriptor.setIndices(classDescriptor.getIndexes());
        tableDescriptor.getReferences().addAll(classDescriptor.getObjectReferenceDescriptors());

        this.torqueTableGenerator.generateStandardTable(tableDescriptor, buffer, "JUnit indx");
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.ForeignKey.addColumn()

       
        FKMapKey fkmk = new FKMapKey(fk);
        ForeignKey baseKey = fkMap.get(fkmk);
        // Found the FK, add the additional column
        if (baseKey != null) {
            baseKey.addColumn(fk);
            return baseKey;
        }
        // fkey is new
        fkMap.put(fkmk, fk);
        return fk;
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.Index.addColumn()

            DBIdentifier fullIdxId = tab.getFullIdentifier().clone();
            DBIdentifier unQualifiedName = DBIdentifier.append(fullIdxId.getUnqualifiedName(), "IDX");
            fullIdxId.setName(getValidIndexName(unQualifiedName, tab));
            Index idx = tab.addIndex(fullIdxId);
            idx.setUnique(true);
            idx.addColumn(pkColumn);
        }
    }
   
    @Override
    public boolean isFatalException(int subtype, SQLException ex) {
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.