mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-1.1.0' into cassandra-1.1
This commit is contained in:
commit
d025bec100
|
|
@ -44,6 +44,7 @@ Merged from 1.0:
|
|||
|
||||
|
||||
1.1-beta1
|
||||
* add SOURCE and CAPTURE cqlsh commands (CASSANDRA-3479)
|
||||
* add nodetool rebuild_index (CASSANDRA-3583)
|
||||
* add nodetool rangekeysample (CASSANDRA-2917)
|
||||
* Fix streaming too much data during move operations (CASSANDRA-3639)
|
||||
|
|
|
|||
4
NEWS.txt
4
NEWS.txt
|
|
@ -60,6 +60,10 @@ Features
|
|||
be pinned to specfic media.
|
||||
- Hadoop: a new BulkOutputFormat is included which will directly write
|
||||
SSTables locally and then stream them into the cluster.
|
||||
YOU SHOULD USE BulkOutputFormat BY DEFAULT. ColumnFamilyOutputFormat
|
||||
is still around in case for some strange reason you want results
|
||||
trickling out over Thrift, but BulkOutputFormat is significantly
|
||||
more efficient.
|
||||
- Hadoop: KeyRange.filter is now supported with ColumnFamilyInputFormat
|
||||
- Hadoop wide row mode added to ColumnFamilyInputFormat
|
||||
- The bulk loader is not longer a fat client; it can be run from an
|
||||
|
|
|
|||
|
|
@ -10,5 +10,16 @@ You can then set the authenticator and authority properties in cassandra.yaml
|
|||
to use those classes. See the two configuration files access.properties and
|
||||
passwd.properties to configure the authorized users and permissions.
|
||||
|
||||
When starting cassandra, you need to specify the location of the passwd.properties
|
||||
and access.properties files by adding JVM args similar to the following either
|
||||
in cassandra-env.sh or as commandline arguments:
|
||||
|
||||
-Dpasswd.properties=conf/passwd.properties
|
||||
-Daccess.properties=conf/access.properties
|
||||
|
||||
For example, you might invoke cassandra as follows:
|
||||
|
||||
bin/cassandra -f -Dpasswd.properties=conf/passwd.properties -Daccess.properties=conf/access.properties
|
||||
|
||||
Please note that the code in this directory is for demonstration purposes. In
|
||||
particular, it does not provide a high level of security.
|
||||
|
|
|
|||
|
|
@ -51,10 +51,15 @@ public class Ec2Snitch extends AbstractNetworkTopologySnitch
|
|||
|
||||
public Ec2Snitch() throws IOException, ConfigurationException
|
||||
{
|
||||
String az = awsApiCall(ZONE_NAME_QUERY_URL);
|
||||
// Split "us-east-1a" or "asia-1a" into "us-east"/"1a" and "asia"/"1a".
|
||||
String[] splits = awsApiCall(ZONE_NAME_QUERY_URL).split("-");
|
||||
String[] splits = az.split("-");
|
||||
ec2zone = splits[splits.length - 1];
|
||||
ec2region = splits.length < 3 ? splits[0] : splits[0] + "-" + splits[1];
|
||||
|
||||
// hack for CASSANDRA-4026
|
||||
ec2region = az.substring(0, az.length() - 1);
|
||||
if (ec2region.endsWith("1"))
|
||||
ec2region = az.substring(0, az.length() - 3);
|
||||
logger.info("EC2Snitch using region: " + ec2region + ", zone: " + ec2zone + ".");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import org.junit.Test;
|
|||
|
||||
public class EC2SnitchTest
|
||||
{
|
||||
private static String az;
|
||||
|
||||
private class TestEC2Snitch extends Ec2Snitch
|
||||
{
|
||||
|
|
@ -47,13 +48,14 @@ public class EC2SnitchTest
|
|||
@Override
|
||||
String awsApiCall(String url) throws IOException, ConfigurationException
|
||||
{
|
||||
return "us-east-1d";
|
||||
return az;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRac() throws IOException, ConfigurationException
|
||||
{
|
||||
az = "us-east-1d";
|
||||
Ec2Snitch snitch = new TestEC2Snitch();
|
||||
InetAddress local = InetAddress.getByName("127.0.0.1");
|
||||
InetAddress nonlocal = InetAddress.getByName("127.0.0.7");
|
||||
|
|
@ -69,4 +71,14 @@ public class EC2SnitchTest
|
|||
assertEquals("us-east", snitch.getDatacenter(local));
|
||||
assertEquals("1d", snitch.getRack(local));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNewRegions() throws IOException, ConfigurationException
|
||||
{
|
||||
az = "us-east-2d";
|
||||
Ec2Snitch snitch = new TestEC2Snitch();
|
||||
InetAddress local = InetAddress.getByName("127.0.0.1");
|
||||
assertEquals("us-east-2", snitch.getDatacenter(local));
|
||||
assertEquals("2d", snitch.getRack(local));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue