class ReplicaPartitioner[T] extends Partitioner
The replica partitioner will work on an RDD which is keyed on sets of InetAddresses representing Cassandra Hosts . It will group keys which share a common IP address into partitionsPerReplicaSet Partitions.
- Alphabetic
- By Inheritance
- ReplicaPartitioner
- Partitioner
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ReplicaPartitioner(table: String, keyspace: String, partitionsPerReplicaSet: Int, partitionKeyMapper: ColumnSelector, connector: CassandraConnector)(implicit currentType: ClassTag[T], rwf: RowWriterFactory[T])
- partitionsPerReplicaSet
The number of Spark Partitions to make Per Unique Endpoint
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val _keyspace: CqlIdentifier
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val connector: CassandraConnector
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getEndpointPartition(partition: Partition): ReplicaPartition
-
def
getPartition(key: Any): Int
Given a set of endpoints, pick a random endpoint, and then a random partition owned by that endpoint.
Given a set of endpoints, pick a random endpoint, and then a random partition owned by that endpoint. If the requested host doesn't exist chose another random host. Only uses valid hosts from the connected datacenter.
- key
A Set[InetAddress] of replicas for this Cassandra Partition
- returns
An integer between 0 and numPartitions
- Definition Classes
- ReplicaPartitioner → Partitioner
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val nodeAddresses: NodeAddresses
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
numPartitions: Int
- Definition Classes
- ReplicaPartitioner → Partitioner
- val rowWriter: RowWriter[T]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val tableDef: TableDef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()