Package org.apache.avro.generic

Examples of org.apache.avro.generic.GenericArray


              }
            }
            break;
          case ARRAY:
            if(o instanceof GenericArray) {
              GenericArray arr = (GenericArray) o;
              int j=0;
              for(Object item : arr) {
                byte[] val = toBytes(item);
                put.add(hcol.getFamily(), Bytes.toBytes(j++), val);
                hasPuts = true;
View Full Code Here


              newMap.putState(mapKey, map.getState(mapKey));
            }
            fieldValue = newMap;
            break;
          case ARRAY:
            GenericArray array = (GenericArray) fieldValue;
            ListGenericArray newArray = new ListGenericArray(fieldSchema.getElementType());
            Iterator iter = array.iterator();
            while (iter.hasNext()) {
              newArray.add(iter.next());
            }
            fieldValue = newArray;
            break;
View Full Code Here

                count++;
              }
            }
            break;
          case ARRAY:
            GenericArray array = (GenericArray) o;
            int j = 0;
            for (Object item : array) {
              m.put(col.getFirst(), new Text(toBytes(j++)), new Value(toBytes(item)));
              count++;
            }
View Full Code Here

            }
          }
          break;
        case ARRAY:
          if(o instanceof GenericArray) {
            GenericArray arr = (GenericArray) o;
            int j=0;
            for(Object item : arr) {
              byte[] val = toBytes(item);
              put.add(hcol.getFamily(), Bytes.toBytes(j++), val);
              hasPuts = true;
View Full Code Here

        break;
      case ARRAY:
        if (value != null) {
          if (value instanceof DirtyListWrapper<?>) {
            DirtyListWrapper fieldValue = (DirtyListWrapper<?>)value;
            GenericArray valueArray = new Array(fieldValue.size(), schema);
            for (int i = 0; i < fieldValue.size(); i++) {
              valueArray.add(i, fieldValue.get(i));
            }
            this.cassandraClient.addGenericArray(key, field.name(), (GenericArray<?>)valueArray);
          } else {
            LOG.warn("Array with value: " + value.toString() + " not supported for field: " + field.name());
          }
View Full Code Here

          }
        }
        break;
      case ARRAY:
        if(o instanceof GenericArray) {
          @SuppressWarnings("rawtypes")
          GenericArray arr = (GenericArray) o;
          int j=0;
          for(Object item : arr) {
            value = ByteUtils.toBytes(item.toString());
            if (col.isSuperColumn()) {
View Full Code Here

            }
          }
          break;
        case ARRAY:
          if(o instanceof GenericArray) {
            GenericArray arr = (GenericArray) o;
            int j=0;
            for(Object item : arr) {
              byte[] val = toBytes(item);
              put.add(hcol.getFamily(), Bytes.toBytes(j++), val);
              hasPuts = true;
View Full Code Here

              count++;
            }
          }
          break;
        case ARRAY:
          GenericArray array = (GenericArray) o;
          int j = 0;
          for (Object item : array) {
            m.put(col.getFirst(), new Text(toBytes(j++)), new Value(toBytes(item)));
            count++;
          }
View Full Code Here

            break;
          case MAP:
            // needs to keep State.DELETED.
            break;
          case ARRAY:
            GenericArray array = (GenericArray) fieldValue;
            ListGenericArray newArray = new ListGenericArray(fieldSchema.getElementType());
            Iterator iter = array.iterator();
            while (iter.hasNext()) {
              newArray.add(iter.next());
            }
            fieldValue = newArray;
            break;
View Full Code Here

            }
          }
          break;
        case ARRAY:
          if(o instanceof GenericArray) {
            GenericArray arr = (GenericArray) o;
            int j=0;
            for(Object item : arr) {
              byte[] val = toBytes(item);
              put.add(hcol.getFamily(), Bytes.toBytes(j++), val);
              hasPuts = true;
View Full Code Here

TOP

Related Classes of org.apache.avro.generic.GenericArray

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.