Skip to content

Commit

Permalink
TODOs for refactoring and copyright header updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjwylie committed Mar 20, 2013
1 parent 1a0b8f7 commit 9c75277
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 2 deletions.
3 changes: 2 additions & 1 deletion META-INF/MANIFEST.MF
@@ -1,7 +1,8 @@
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 20.2-b06 (Sun Microsystems Inc.)
Voldemort-Implementation-Version: 1.3.0
Implementation-Title: Voldemort
Implementation-Version: 1.2.0
Implementation-Version: 1.3.0
Implementation-Vendor: LinkedIn

15 changes: 15 additions & 0 deletions contrib/ec2-testing/test/voldemort/utils/Ec2GossipTest.java
@@ -1,3 +1,18 @@
/*
* Copyright 2013 LinkedIn, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package voldemort.utils;

import static org.junit.Assert.assertEquals;
Expand Down
15 changes: 15 additions & 0 deletions contrib/ec2-testing/test/voldemort/utils/Ec2RebalanceTest.java
@@ -1,3 +1,18 @@
/*
* Copyright 2013 LinkedIn, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package voldemort.utils;

import static voldemort.utils.Ec2RemoteTestUtils.createInstances;
Expand Down
@@ -1,3 +1,18 @@
/*
* Copyright 2013 LinkedIn, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package voldemort.server.protocol.admin;

import java.io.DataOutputStream;
Expand Down
6 changes: 6 additions & 0 deletions src/java/voldemort/utils/ClusterInstance.java
Expand Up @@ -27,13 +27,19 @@

import com.google.common.collect.Maps;

// TODO: Add ClusterInstanceTest unit test for these helper methods.

/**
* This class wraps up a Cluster object and a List<StoreDefinition>. The methods
* are effectively helper or util style methods for analyzing partitions and so
* on which are a function of both Cluster and List<StoreDefinition>.
*/
public class ClusterInstance {

// TODO: (refactor) Improve upon the name "ClusterInstance". Object-oriented
// meaning of 'instance' is too easily confused with system notion of an
// "instance of a cluster" (the intended usage in this class name).

private final Cluster cluster;
private final List<StoreDefinition> storeDefs;

Expand Down
4 changes: 4 additions & 0 deletions src/java/voldemort/utils/ClusterUtils.java
Expand Up @@ -32,6 +32,10 @@

import com.google.common.collect.Maps;

// TODO: (refactor) Move all of the static "util" methods for which Cluster is
// the only complex type that the method operates on to be members of the
// Cluster class. Unclear whether 'nodeid' and 'partitionid' should be treated
// as complex types since they are proxies for complicated concepts.
/**
* ClusterUtils provides basic tools for manipulating and inspecting a cluster.
*
Expand Down
5 changes: 5 additions & 0 deletions src/java/voldemort/utils/NodeUtils.java
Expand Up @@ -27,6 +27,11 @@

import com.google.common.collect.Sets;

// TODO: (refactor) Move all of the static "util" methods for which Node is
// the only complex type that the method operates on to be members of the
// Cluster class. Unclear how to treat the Integer and List types of partition
// ids...

/**
* NodeUtils provides basic tools for manipulating and inspecting nodes.
*
Expand Down
6 changes: 6 additions & 0 deletions src/java/voldemort/utils/RebalanceClusterUtils.java
Expand Up @@ -42,6 +42,10 @@
*/
public class RebalanceClusterUtils {

// TODO: (refactor) Improve upon the name "RebalanceClusterUtils". All of
// these util methods support moving partitions around a cluster to achieve
// better balance.

private static Logger logger = Logger.getLogger(RebalanceClusterUtils.class);

/**
Expand Down Expand Up @@ -371,6 +375,8 @@ public static Cluster balancePrimaryPartitionsPerNode(final Cluster targetCluste
return returnCluster;
}

// TODO: Add a similar method that rebalances a cluster to ensure that no
// Node hosts contiguous partition IDs (rather than doing so at zone level).
/**
* Loops over cluster and repeatedly tries to break up contiguous runs of
* partitions. After each phase of breaking up contiguous partitions, random
Expand Down
7 changes: 6 additions & 1 deletion src/java/voldemort/utils/StoreInstance.java
Expand Up @@ -30,14 +30,19 @@

import com.google.common.collect.Lists;

// TODO: Add StoreInstanceTest unit test for these helper methods.

/**
* This class wraps up a Cluster object and a StoreDefinition. The methods are
* effectively helper or util style methods for analyzing partitions and so on
* which are a function of both Cluster and StoreDefinition.
*/
// TODO: Add StoreInstanceTest unit test for these helper methods.
public class StoreInstance {

// TODO: (refactor) Improve upon the name "StoreInstance". Object-oriented
// meaning of 'instance' is too easily confused with system notion of an
// "instance of a cluster" (the intended usage in this class name).

private final Cluster cluster;
private final StoreDefinition storeDefinition;

Expand Down

0 comments on commit 9c75277

Please sign in to comment.