Table of Contents

Class StreamPartitioner<K, V, TJVMK, TJVMV>

Namespace
MASES.KNet.Streams.Processor
Assembly
MASES.KNet.dll

KNet implementation of StreamPartitioner<K, V>

public class StreamPartitioner<K, V, TJVMK, TJVMV> : StreamPartitioner<TJVMK, TJVMV>, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, IStreamPartitioner<TJVMK, TJVMV>, IJVMBridgeBase, IJVMBridgeDefinition, IGenericSerDesFactoryApplier

Type Parameters

K

The key type

V

The value type

TJVMK

The JVM type of K

TJVMV

The JVM type of V

Inheritance
StreamPartitioner<TJVMK, TJVMV>
StreamPartitioner<K, V, TJVMK, TJVMV>
Implements
IStreamPartitioner<TJVMK, TJVMV>
Derived
Inherited Members

Properties

Factory

Returns the current IGenericSerDesFactory

protected IGenericSerDesFactory Factory { get; }

Property Value

IGenericSerDesFactory

Key

The K content

public virtual K Key { get; }

Property Value

K

NumPartitions

The total number of partitions

public virtual int NumPartitions { get; }

Property Value

int

OnPartitions

public Func<StreamPartitioner<K, V, TJVMK, TJVMV>, ICollection<int?>> OnPartitions { get; set; }

Property Value

Func<StreamPartitioner<K, V, TJVMK, TJVMV>, ICollection<int?>>

Remarks

If OnPartitions has a value it takes precedence over corresponding Partitions() class method

Topic

The topic name this record is sent to

public virtual string Topic { get; }

Property Value

string

Value

The V content

public virtual V Value { get; }

Property Value

V

Methods

Partitions()

public virtual ICollection<int?> Partitions()

Returns

ICollection<int?>

An Optional of Set of Integers between 0 and numPartitions-1, Empty optional means using default partitioner Optional of an empty set means the record won't be sent to any partitions i.e drop it. Optional of Set of integers means the partitions to which the record should be sent to.

Partitions(String, TJVMK, TJVMV, int)

public override Optional<Set<Integer>> Partitions(String arg0, TJVMK arg1, TJVMV arg2, int arg3)

Parameters

arg0 String

String

arg1 TJVMK

K

arg2 TJVMV

V

arg3 int

int

Returns

Optional<Set<Integer>>

Optional