This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testOrphanBlobStore() throws Exception { | |
int instances = 2; | |
long cleanupInterval = 1000l; | |
BlobClient blobClient = null; | |
BlobStoreService blobStoreService = null; | |
BlobServer[] blobServers = new BlobServer[instances]; | |
BlobLibraryCacheManager[] managers = new BlobLibraryCacheManager[instances]; | |
InetSocketAddress[] addresses = new InetSocketAddress[instances]; | |
Random random = new Random(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestDrainingServer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestDrainingServer.java | |
index c1723e2..6488b32 100644 | |
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestDrainingServer.java | |
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestDrainingServer.java | |
@@ -18,33 +18,41 @@ | |
package org.apache.hadoop.hbase; | |
-import java.io.IOException; | |
-import java.util.ArrayList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.hadoop.hbase; | |
import com.google.protobuf.ServiceException; | |
import org.apache.commons.logging.Log; | |
import org.apache.commons.logging.LogFactory; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.hbase.catalog.CatalogTracker; | |
import org.apache.hadoop.hbase.executor.EventType; | |
import org.apache.hadoop.hbase.executor.ExecutorService; | |
import org.apache.hadoop.hbase.executor.ExecutorType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testAssignmentManagerDoesntUseDrainingServer() throws KeeperException, IOException, InterruptedException { | |
Server server = Mockito.mock(Server.class); | |
ServerManager serverManager = Mockito.mock(ServerManager.class); | |
CatalogTracker catalogTracker = Mockito.mock(CatalogTracker.class); | |
LoadBalancer balancer = Mockito.mock(LoadBalancer.class); | |
ExecutorService service = Mockito.mock(ExecutorService.class); | |
TableLockManager tableLockManager = Mockito.mock(TableLockManager.class); | |
RecoverableZooKeeper recoverableZooKeeper = Mockito.mock(RecoverableZooKeeper.class); | |
ZooKeeperWatcher zkw = Mockito.mock(ZooKeeperWatcher.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is an unit test, to verify if Assignment Manager | |
* doesn't use a drained server, comparing number of online region | |
* on initial state of the cluster is equal after to put a server | |
* into a drained list. | |
* | |
* @throws ServiceException | |
* @throws InterruptedException | |
* @throws IOException | |
* @throws KeeperException |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testAssignmentManagementDoesNotUseDrainedServers() | |
throws KeeperException, Exception { | |
HMaster master = TEST_UTIL.getHBaseCluster().getMaster(); | |
waitForAllRegionsOnline(); | |
ServerManager serverManager = master.getServerManager(); | |
AssignmentManager assignmentManager = master.getAssignmentManager(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean accept(Path p) { | |
boolean isValid = false; | |
try { | |
if (HConstants.HBASE_NON_USER_TABLE_DIRS.contains(p.toString())) { | |
isValid = false; | |
} else { | |
isValid = this.fs.getFileStatus(p).isDir(); | |
} | |
} catch (IOException e) { | |
String nonUserTableDirs = HConstants.HBASE_NON_USER_TABLE_DIRS.toString(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Line 227 | |
*/ | |
static void | |
native_mutex_initialize(pthread_mutex_t *lock) | |
{ | |
/* | |
* Creating mutex attribute with Mutex Recursive | |
* option, to allow self lock. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VALUE | |
rb_f_kill(int argc, VALUE *argv) | |
{ | |
/*............................................. */ | |
/* line 389 */ | |
if (sig < 0) { | |
sig = -sig; | |
for (i=1; i<argc; i++) { | |
if (killpg(NUM2PIDT(argv[i]), sig) < 0) |
NewerOlder