Examples of HRecordImpl


Examples of org.apache.hadoop.hbase.hbql.impl.HRecordImpl

                            final List<SelectElement> selectElementList,
                            final int maxVersions,
                            final Result result) throws HBqlException {

        // Create object and assign values
        final HRecordImpl newrec = new HRecordImpl(mappingContext);
        this.assignSelectValues(conn, newrec, selectElementList, maxVersions, result);
        return newrec;
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.impl.HRecordImpl

                                  final Object obj,
                                  final int maxVerions,
                                  final Result result) throws HBqlException {

        if (obj instanceof HRecordImpl) {
            final HRecordImpl record = (HRecordImpl)obj;
            record.addNameToPositionList(this.getSelectName());
        }

        if (this.isAKeyValue())
            return;
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.impl.HRecordImpl

    }

    public void insert(final T newrec) throws HBqlException {

        if (newrec instanceof HRecordImpl) {
            final HRecordImpl record = (HRecordImpl)newrec;
            final TableMapping tableMapping = record.getTableMapping();
            final ColumnAttrib keyAttrib = tableMapping.getKeyAttrib();
            if (!record.isCurrentValueSet(keyAttrib))
                throw new HBqlException("Record key value must be assigned");

            final Put put = this.createPut(record.getResultAccessor(), record);
            this.getActionList(tableMapping.getTableName()).add(new InsertAction(put));
        }
        else {
            final AnnotationResultAccessor accessor = this.getHConnectionImpl().getAnnotationMapping(newrec);
            final Put put = this.createPut(accessor, newrec);
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.impl.HRecordImpl

    }

    public void delete(final T newrec) throws HBqlException {

        if (newrec instanceof HRecordImpl) {
            final HRecordImpl record = (HRecordImpl)newrec;
            final TableMapping tableMapping = record.getTableMapping();
            final ColumnAttrib keyAttrib = tableMapping.getKeyAttrib();
            if (!record.isCurrentValueSet(keyAttrib))
                throw new HBqlException("Record key value must be assigned");
            this.delete(tableMapping, record);
        }
        else {
            final AnnotationResultAccessor accessor = this.getHConnectionImpl().getAnnotationMapping(newrec);
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.impl.HRecordImpl

        final ColumnAttrib keyAttrib = resultAccessor.getKeyAttrib();

        final Put put;

        if (newrec instanceof HRecordImpl) {
            final HRecordImpl record = (HRecordImpl)newrec;
            final byte[] keyval = keyAttrib.getValueAsBytes(record);
            put = new Put(keyval);

            for (final String family : tableMapping.getFamilySet()) {
                for (final ColumnAttrib attrib : tableMapping.getColumnAttribListByFamilyName(family)) {
                    if (record.isCurrentValueSet(attrib)) {
                        final byte[] b = attrib.getValueAsBytes(record);
                        put.add(attrib.getFamilyNameAsBytes(), attrib.getColumnNameAsBytes(), b);
                    }
                }
            }
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.impl.HRecordImpl

                final byte[] valueBytes = columnMap.get(columnBytes);
                final String columnName = IO.getSerialization().getStringFromBytes(columnBytes);

                if (obj instanceof HRecordImpl) {
                    final HRecordImpl record = (HRecordImpl)obj;
                    record.addNameToPositionList(familyName + ":" + columnName);
                }

                final ColumnAttrib attrib = this.getResultAccessor().getColumnAttribByQualifiedName(familyName,
                                                                                                    columnName);
                if (attrib == null) {
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.impl.HRecordImpl

    }

    public HRecord newHRecord() throws HBqlException {
        final MappingContext mappingContext = new MappingContext(this);
        mappingContext.setResultAccessor(new HRecordResultAccessor(mappingContext));
        return new HRecordImpl(mappingContext);
    }
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.