我也谈过几个女朋友,她们对我的唯一共同评价是# Piebridge - 鹊桥
m*3
1 楼
本人QA,测试数据库,老板给了一题让我做做玩玩,我不太会,请教版上大牛,谢谢!
!!
Background
In simplest terms, Accumulo is a sorted key/value store. It stores mappings
of keys to values, and all key/value entries are sorted by key. This allows
fast indexed access for get and put calls, and also supports quickly
scanning all entries starting at or near a specific key.
Accumulo distributes work across a cluster of servers by designating
responsibility for different ranges of keys to different servers. In
Accumulo terminology, each range is a 'tablet', and each server is a 'tablet
server'. A tablet server is responsible for all reads and writes to entries
within its ranges of keys. Every tablet is served by exactly one tablet
server at a time. Each tablet server can serve zero to many tablets at once.
The "Master" service is responsible for maintaining the assignments of keys
to tablet servers, including responding to changes in the cluster as tablet
servers come up and go down. The Master should balance the tablets as
evenly as possible across the tablet servers, while still minimizing
reassignments of tablets from one server to another.
Requirements
For this exercise, imagine you have a cluster of servers running Linux. One
is running the Master service, and all of them are configured to be tablet
servers. The Master service does the following:
1. Takes as input a fixed number of tablets and a set of tablet
servers
2. Calculates the ranges that define each tablet
3. Assigns each tablet to a tablet server
You can make a few simplifying assumptions for the purpose of this exercise:
• The key space is the range of values from 0 to Java's Long.
MAX_VALUE
• Ranges should be defined by simply splitting up the key space
into equal sized chunks
• Note that these assumptions are not true in the actual
Accumulo implementation! Accumulo's elastic distribution strategy is very
robust and flexible.
You have ssh access to each machine. For the tablet servers, you don't have
any direct access to the software, but each has a log file. For the Master
service, there is an admin interface that lets you do the following:
1. Input the number of tablets and the number of tablet servers
2. Add/remove a tablet
3. Add/remove a tablet server
4. Output the mapping of tablets to tablet servers, and the ranges
for each tablet.
Usage Example
Input: 4 tablets, 2 tablet severs
There will be four tablets
tablet1 has keys from 0-2305843009213693951 tablet2 has keys from
2305843009213693952-4611686018427387903 tablet3 has keys from
4611686018427387904-6917529027641081855 tablet4 has keys from
6917529027641081856-9223372036854775807
And they could start in the following mapping
tablet1 --> tabletserver1 tablet2 --> tabletserver2 tablet3 -->
tabletserver1 tablet4 --> tabletserver2
If a new tablet server was added, the load balancer would move one of the
tablets off onto the new tablet server. The workload would not be exactly
equal across servers, because 4 tablets cannot be divided evenly across 3
servers.
tablet1 --> tabletserver1 tablet2 --> tabletserver2 tablet3 -->
tabletserver3 tablet4 --> tabletserver2
Exercise
Your task is to come up with a test plan for the above system. You don't
need to spell out all of the steps for each test, but you should describe
what the test does, and possibly why (if it's not obvious).
!!
Background
In simplest terms, Accumulo is a sorted key/value store. It stores mappings
of keys to values, and all key/value entries are sorted by key. This allows
fast indexed access for get and put calls, and also supports quickly
scanning all entries starting at or near a specific key.
Accumulo distributes work across a cluster of servers by designating
responsibility for different ranges of keys to different servers. In
Accumulo terminology, each range is a 'tablet', and each server is a 'tablet
server'. A tablet server is responsible for all reads and writes to entries
within its ranges of keys. Every tablet is served by exactly one tablet
server at a time. Each tablet server can serve zero to many tablets at once.
The "Master" service is responsible for maintaining the assignments of keys
to tablet servers, including responding to changes in the cluster as tablet
servers come up and go down. The Master should balance the tablets as
evenly as possible across the tablet servers, while still minimizing
reassignments of tablets from one server to another.
Requirements
For this exercise, imagine you have a cluster of servers running Linux. One
is running the Master service, and all of them are configured to be tablet
servers. The Master service does the following:
1. Takes as input a fixed number of tablets and a set of tablet
servers
2. Calculates the ranges that define each tablet
3. Assigns each tablet to a tablet server
You can make a few simplifying assumptions for the purpose of this exercise:
• The key space is the range of values from 0 to Java's Long.
MAX_VALUE
• Ranges should be defined by simply splitting up the key space
into equal sized chunks
• Note that these assumptions are not true in the actual
Accumulo implementation! Accumulo's elastic distribution strategy is very
robust and flexible.
You have ssh access to each machine. For the tablet servers, you don't have
any direct access to the software, but each has a log file. For the Master
service, there is an admin interface that lets you do the following:
1. Input the number of tablets and the number of tablet servers
2. Add/remove a tablet
3. Add/remove a tablet server
4. Output the mapping of tablets to tablet servers, and the ranges
for each tablet.
Usage Example
Input: 4 tablets, 2 tablet severs
There will be four tablets
tablet1 has keys from 0-2305843009213693951 tablet2 has keys from
2305843009213693952-4611686018427387903 tablet3 has keys from
4611686018427387904-6917529027641081855 tablet4 has keys from
6917529027641081856-9223372036854775807
And they could start in the following mapping
tablet1 --> tabletserver1 tablet2 --> tabletserver2 tablet3 -->
tabletserver1 tablet4 --> tabletserver2
If a new tablet server was added, the load balancer would move one of the
tablets off onto the new tablet server. The workload would not be exactly
equal across servers, because 4 tablets cannot be divided evenly across 3
servers.
tablet1 --> tabletserver1 tablet2 --> tabletserver2 tablet3 -->
tabletserver3 tablet4 --> tabletserver2
Exercise
Your task is to come up with a test plan for the above system. You don't
need to spell out all of the steps for each test, but you should describe
what the test does, and possibly why (if it's not obvious).