/** * @return true if there is at least one actor thread running which is * talking to a NameNode. */ boolean isAlive() { for (BPServiceActor actor : bpServices) { if (actor.isAlive()) { return true; } } return false; }
/** * @param addr rpc address of the namenode * @return true if the datanode is connected to a NameNode at the * given address */ public boolean isConnectedToNN(InetSocketAddress addr) { for (BPOfferService bpos : getAllBpOs()) { for (BPServiceActor bpsa : bpos.getBPServiceActors()) { if (addr.equals(bpsa.getNNSocketAddress())) { return bpsa.isAlive(); } } } return false; }
/** * @return true if there is at least one actor thread running which is * talking to a NameNode. */ boolean isAlive() { for (BPServiceActor actor : bpServices) { if (actor.isAlive()) { return true; } } return false; }
/** * @return true if there is at least one actor thread running which is * talking to a NameNode. */ boolean isAlive() { for (BPServiceActor actor : bpServices) { if (actor.isAlive()) { return true; } } return false; }
/** * @param addr rpc address of the namenode * @return true if the datanode is connected to a NameNode at the * given address */ public boolean isConnectedToNN(InetSocketAddress addr) { for (BPOfferService bpos : getAllBpOs()) { for (BPServiceActor bpsa : bpos.getBPServiceActors()) { if (addr.equals(bpsa.getNNSocketAddress())) { return bpsa.isAlive(); } } } return false; }
/** * @param addr rpc address of the namenode * @return true if the datanode is connected to a NameNode at the * given address */ public boolean isConnectedToNN(InetSocketAddress addr) { for (BPOfferService bpos : getAllBpOs()) { for (BPServiceActor bpsa : bpos.getBPServiceActors()) { if (addr.equals(bpsa.getNNSocketAddress())) { return bpsa.isAlive(); } } } return false; }
@Override public Boolean get() { List<BPServiceActor> actors = bpos.getBPServiceActors(); int failedcount = 0; for (BPServiceActor actor : actors) { if (!actor.isAlive()) { failedcount++; } } return failedcount == 1; } }, 100, 10000);