Examples of BSONWritable


Examples of com.mongodb.hadoop.io.BSONWritable

        BasicBSONList tags = (BasicBSONList) value.get("tags");
        Text text = new Text();
        value.removeField("tags");
        for (Object tag : tags) {
            text.set((String) tag);
            context.write(text, new BSONWritable(value));
        }
    }
View Full Code Here

Examples of com.mongodb.hadoop.io.BSONWritable


    //CHECKSTYLE:OFF
    @Override
    public Writable serialize(final Object obj, final ObjectInspector oi) throws SerDeException {
        return new BSONWritable((BSONObject) serializeStruct(obj, (StructObjectInspector) oi, ""));
    }
View Full Code Here

Examples of com.mongodb.hadoop.io.BSONWritable

        return NullWritable.get();
    }

    @Override
    public BSONWritable createValue() {
        return new BSONWritable();
    }
View Full Code Here

Examples of com.mongodb.hadoop.io.BSONWritable

        }
    }


    public BSONWritable createKey() {
        return new BSONWritable();
    }
View Full Code Here

Examples of com.mongodb.hadoop.io.BSONWritable

    public BSONWritable createKey() {
        return new BSONWritable();
    }

    public BSONWritable createValue() {
        return new BSONWritable();
    }
View Full Code Here

Examples of com.mongodb.hadoop.io.BSONWritable

        ObjectInspector innerInspector =
            PrimitiveObjectInspectorFactory.getPrimitiveObjectInspectorFromClass(String.class);
        BasicBSONObject bObject = new BasicBSONObject();
        Object serialized = helpSerialize(columnNames, innerInspector, bObject, value, serde);
        assertThat(new BSONWritable(bObject), equalTo(serialized));
    }
View Full Code Here

Examples of com.mongodb.hadoop.io.BSONWritable

        ObjectInspector innerInspector =
            PrimitiveObjectInspectorFactory.getPrimitiveObjectInspectorFromClass(Double.class);
        BasicBSONObject bObject = new BasicBSONObject();
        Object serialized = helpSerialize(columnNames, innerInspector, bObject, value, serde);
        assertThat(new BSONWritable(bObject), equalTo(serialized));
    }
View Full Code Here

Examples of com.mongodb.hadoop.io.BSONWritable

        ObjectInspector innerInspector =
            PrimitiveObjectInspectorFactory.getPrimitiveObjectInspectorFromClass(Integer.class);
        BasicBSONObject bObject = new BasicBSONObject();
        Object serialized = helpSerialize(columnNames, innerInspector, bObject, value, serde);
        assertThat(new BSONWritable(bObject), equalTo(serialized));
    }
View Full Code Here

Examples of com.mongodb.hadoop.io.BSONWritable

        ObjectInspector innerInspector =
            PrimitiveObjectInspectorFactory.getPrimitiveObjectInspectorFromClass(byte[].class);
        BasicBSONObject bObject = new BasicBSONObject();
        Object serialized = helpSerialize(columnNames, innerInspector, bObject, value, serde);
        assertThat(new BSONWritable(bObject), equalTo(serialized));
    }
View Full Code Here

Examples of com.mongodb.hadoop.io.BSONWritable

        ObjectInspector innerInspector =
            PrimitiveObjectInspectorFactory.getPrimitiveObjectInspectorFromClass(Boolean.class);
        BasicBSONObject bObject = new BasicBSONObject();
        Object serialized = helpSerialize(columnNames, innerInspector, bObject, value, serde);
        assertThat(new BSONWritable(bObject), equalTo(serialized));
    }
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.