Updated the version of hadoop and added back in the capcity checking on hdfs
Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/b07faefd Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/b07faefd Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/b07faefd Branch: refs/heads/master Commit: b07faefd4c0ae2bf8d4cfdc8c03e0914d53d4863 Parents: 4293a5a Author: Chris Rohr <[email protected]> Authored: Tue Sep 3 07:19:25 2013 -0400 Committer: Chris Rohr <[email protected]> Committed: Tue Sep 3 07:19:25 2013 -0400 ---------------------------------------------------------------------- contrib/blur-console/blur-agent/pom.xml | 2 +- .../apache/blur/agent/collectors/hdfs/HdfsStatsCollector.java | 6 +++--- .../blur/agent/collectors/blur/query/QueryCollectorTest.java | 7 ------- 3 files changed, 4 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b07faefd/contrib/blur-console/blur-agent/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-agent/pom.xml b/contrib/blur-console/blur-agent/pom.xml index 806139a..e9e5c23 100644 --- a/contrib/blur-console/blur-agent/pom.xml +++ b/contrib/blur-console/blur-agent/pom.xml @@ -141,7 +141,7 @@ under the License. <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-test</artifactId> - <version>1.0.4</version> + <version>1.2.1</version> <scope>test</scope> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b07faefd/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/collectors/hdfs/HdfsStatsCollector.java ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/collectors/hdfs/HdfsStatsCollector.java b/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/collectors/hdfs/HdfsStatsCollector.java index ebcfc16..2214ddf 100644 --- a/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/collectors/hdfs/HdfsStatsCollector.java +++ b/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/collectors/hdfs/HdfsStatsCollector.java @@ -70,10 +70,10 @@ public class HdfsStatsCollector implements Runnable { // TODO: Need to figure out how to do hadoop version check for this information. //FsStatus ds = dfs.getStatus(); - long capacity = -1;//ds.getCapacity(); - long used = -1;//ds.getUsed(); + long capacity = dfs.getRawCapacity();//ds.getCapacity(); + long used = dfs.getRawUsed();//ds.getUsed(); long logical_used = used / dfs.getDefaultReplication(); - long remaining = -1; //ds.getRemaining(); + long remaining = capacity - used; //ds.getRemaining(); long presentCapacity = used + remaining; long liveNodes = -1; http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b07faefd/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/blur/query/QueryCollectorTest.java ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/blur/query/QueryCollectorTest.java b/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/blur/query/QueryCollectorTest.java index 2e661ef..580e411 100644 --- a/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/blur/query/QueryCollectorTest.java +++ b/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/blur/query/QueryCollectorTest.java @@ -20,7 +20,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import java.io.IOException; -import java.util.Arrays; import org.apache.blur.MiniCluster; import org.apache.blur.agent.connections.blur.BlurDatabaseConnection; @@ -30,13 +29,7 @@ import org.apache.blur.thrift.BlurClient; import org.apache.blur.thrift.generated.Blur.Iface; import org.apache.blur.thrift.generated.BlurException; import org.apache.blur.thrift.generated.BlurQuery; -import org.apache.blur.thrift.generated.Column; import org.apache.blur.thrift.generated.Query; -import org.apache.blur.thrift.generated.Record; -import org.apache.blur.thrift.generated.RecordMutation; -import org.apache.blur.thrift.generated.RecordMutationType; -import org.apache.blur.thrift.generated.RowMutation; -import org.apache.blur.thrift.generated.RowMutationType; import org.apache.blur.thrift.generated.ScoreType; import org.apache.blur.thrift.generated.TableDescriptor; import org.junit.Test;
