416DAT

Check-in [db53730a21]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add keyspace partitioner for distributing workload.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:db53730a21d374ad3049c993ec93367171b2a5d2
User & Date: rchow 2013-04-09 05:06:11
Context
2013-04-09
05:14
Add YCSB workload results for OrientDB. check-in: c6fcb80b8e user: rchow tags: trunk
05:06
Add keyspace partitioner for distributing workload. check-in: db53730a21 user: rchow tags: trunk
05:03
Add modified YCSB OrientDB client. check-in: 2839a411f2 user: rchow tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added Raymond/Host.java.







































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * File: Host.java
 * Author: Jesse Chezenko
 */

package com.yahoo.ycsb;

import java.util.List;

public class Host {

	private int minKey;
	private int maxKey;
	private String hostIP;

	public Host(int minKey, int maxKey, String hostIP)
	{
		this.minKey = minKey;
		this.maxKey = maxKey;
		this.hostIP = hostIP;
	}

	public boolean isInsideRange(int key)
	{
		if( key >= minKey && key < maxKey )
		{
			return true;
		}
		else
		{
			return false;
		}
	}

	public String getHostIP()
	{
		return hostIP;
	}

	public static Host whichHost(int key, List<Host> listHosts)
  {
    for( Host h: listHosts )
    {
      if( h.isInsideRange(key) )
      {
        return h;
      }
    }
    return null;
  }
}