/** * Go thrift gzip serializer */ public static byte[] serialize(Object obj) { /** * JStorm disables the thrift.gz.serializer */ // return serializationDelegate.serialize(obj); return javaSerialize(obj); }
public BatchBoltExecutor(IBatchBolt bolt) { _boltSer = Utils.javaSerialize(bolt); }
protected byte[] serialize(Object data) { return Utils.javaSerialize(data); }
/** * Add a new worker lifecycle hook * * @param workerHook the lifecycle hook to add */ public void addWorkerHook(IWorkerHook workerHook) { if(null == workerHook) { throw new IllegalArgumentException("WorkerHook must not be null."); } _workerHooks.add(ByteBuffer.wrap(Utils.javaSerialize(workerHook))); }
protected void put(String key, Object value, Entry<Integer, ColumnFamilyHandle> entry) { byte[] data = Utils.javaSerialize(value); try { ttlDB.put(entry.getValue(), key.getBytes(), data); } catch (Exception e) { LOG.error("Failed to put key into cache, " + key, e); return; } for (Entry<Integer, ColumnFamilyHandle> removeEntry : windowHandlers.entrySet()) { if (removeEntry.getKey().equals(entry.getKey())) { continue; } try { ttlDB.remove(removeEntry.getValue(), key.getBytes()); } catch (Exception e) { LOG.warn("Failed to remove other " + key); } } }
/** * ## Repartitioning Operation * * @param partitioner * @return */ public Stream partition(CustomStreamGrouping partitioner) { return partition(Grouping.custom_serialized(Utils.javaSerialize(partitioner))); }
@Override public BoltDeclarer customGrouping(String componentId, String streamId, CustomStreamGrouping grouping) { return grouping(componentId, streamId, Grouping.custom_serialized(Utils.javaSerialize(grouping))); }
maybeAddCheckpointInputs(common); maybeAddWatermarkInputs(common, bolt); boltSpecs.put(boltId, new Bolt(ComponentObject.serialized_java(Utils.javaSerialize(bolt)), common)); } catch (RuntimeException wrapperCause) { if (wrapperCause.getCause() != null && NotSerializableException.class.equals(wrapperCause.getCause().getClass())) { ComponentCommon common = getComponentCommon(spoutId, spout); try { spoutSpecs.put(spoutId, new SpoutSpec(ComponentObject.serialized_java(Utils.javaSerialize(spout)), common)); } catch (RuntimeException wrapperCause) { if (wrapperCause.getCause() != null && NotSerializableException.class.equals(wrapperCause.getCause().getClass())) {
Object value = entry.getValue(); byte[] data = Utils.javaSerialize(value); if (StringUtils.isBlank(key) || data == null || data.length == 0) { continue;
private static PartitionNode makeIdentityPartition(Node basis) { return new PartitionNode(basis.streamId, basis.name, basis.allOutputFields, Grouping.custom_serialized(Utils.javaSerialize(new IdentityGrouping()))); }
/** * Go thrift gzip serializer */ public static byte[] serialize(Object obj) { /** * @@@ JStorm disable the thrift.gz.serializer */ // return serializationDelegate.serialize(obj); return javaSerialize(obj); }
public BatchBoltExecutor(IBatchBolt bolt) { _boltSer = Utils.javaSerialize(bolt); }
protected byte[] serialize(Object data) { return Utils.javaSerialize(data); }
/** * Add a new worker lifecycle hook * * @param workerHook the lifecycle hook to add */ public void addWorkerHook(IWorkerHook workerHook) { if(null == workerHook) { throw new IllegalArgumentException("WorkerHook must not be null."); } _workerHooks.add(ByteBuffer.wrap(Utils.javaSerialize(workerHook))); }
protected void put(String key, Object value, Entry<Integer, ColumnFamilyHandle> entry) { byte[] data = Utils.javaSerialize(value); try { ttlDB.put(entry.getValue(), key.getBytes(), data); } catch (Exception e) { LOG.error("Failed put into cache, " + key, e); return; } for (Entry<Integer, ColumnFamilyHandle> removeEntry : windowHandlers.entrySet()) { if (removeEntry.getKey().equals(entry.getKey())) { continue; } try { ttlDB.remove(removeEntry.getValue(), key.getBytes()); } catch (Exception e) { // TODO Auto-generated catch block LOG.warn("Failed to remove other " + key); } } }
/** * ## Repartitioning Operation * * @param partitioner * @return */ public Stream partition(CustomStreamGrouping partitioner) { return partition(Grouping.custom_serialized(Utils.javaSerialize(partitioner))); }
@Override public BoltDeclarer customGrouping(String componentId, String streamId, CustomStreamGrouping grouping) { return grouping(componentId, streamId, Grouping.custom_serialized(Utils.javaSerialize(grouping))); }
try{ maybeAddCheckpointInputs(common); boltSpecs.put(boltId, new Bolt(ComponentObject.serialized_java(Utils.javaSerialize(bolt)), common)); }catch(RuntimeException wrapperCause){ if (wrapperCause.getCause() != null && NotSerializableException.class.equals(wrapperCause.getCause().getClass())){ ComponentCommon common = getComponentCommon(spoutId, spout); try{ spoutSpecs.put(spoutId, new SpoutSpec(ComponentObject.serialized_java(Utils.javaSerialize(spout)), common)); }catch(RuntimeException wrapperCause){ if (wrapperCause.getCause() != null && NotSerializableException.class.equals(wrapperCause.getCause().getClass())){
Object value = entry.getValue(); byte[] data = Utils.javaSerialize(value);
private static PartitionNode makeIdentityPartition(Node basis) { return new PartitionNode(basis.streamId, basis.name, basis.allOutputFields, Grouping.custom_serialized(Utils.javaSerialize(new IdentityGrouping()))); }