@@ -3124,17 +3124,17 @@ public void run() {
31243124
31253125 // read ack
31263126 if (isClient ) {
3127- DNTransferAckProto closeAck =
3128- DNTransferAckProto . parseFrom ( PBHelperClient .vintPrefixed (in ));
3127+ DNTransferAckProto closeAck = DNTransferAckProto . parseFrom (
3128+ PBHelperClient .vintPrefixed (in ));
31293129 LOG .debug ("{}: close-ack={}" , getClass ().getSimpleName (), closeAck );
31303130 if (closeAck .getStatus () != Status .SUCCESS ) {
31313131 if (closeAck .getStatus () == Status .ERROR_ACCESS_TOKEN ) {
31323132 throw new InvalidBlockTokenException (
3133- "Got access token error for connect ack, targets=" + Arrays .asList (targets ));
3133+ "Got access token error for connect ack, targets="
3134+ + Arrays .asList (targets ));
31343135 } else {
3135- throw new IOException (
3136- "Bad connect ack, targets=" + Arrays .asList (targets ) + " status="
3137- + closeAck .getStatus ());
3136+ throw new IOException ("Bad connect ack, targets="
3137+ + Arrays .asList (targets ) + " status=" + closeAck .getStatus ());
31383138 }
31393139 }
31403140 } else {
@@ -3145,7 +3145,8 @@ public void run() {
31453145 throw new RuntimeException (ie );
31463146 }
31473147 handleBadBlock (source , ie , false );
3148- LOG .warn ("{}:Failed to transfer {} to {} got" , bpReg , source , targets [0 ], ie );
3148+ LOG .warn ("{}:Failed to transfer {} to {} got" ,
3149+ bpReg , source , targets [0 ], ie );
31493150 } catch (Throwable t ) {
31503151 LOG .error ("Failed to transfer block {}" , source , t );
31513152 if (copyBlockCrossNamespace ) {
@@ -4428,9 +4429,8 @@ public void copyBlockCrossNamespace(ExtendedBlock sourceBlk, ExtendedBlock targe
44284429 LOG .info (msg );
44294430 throw new IOException (msg );
44304431 }
4431- LOG .info (getDatanodeInfo () + " copyBlock: Starting thread to transfer: " + "block:"
4432- + sourceBlk + " from " + this .getDatanodeUuid () + " to " + targetDn .getDatanodeUuid ()
4433- + "(" + targetDn + ")" );
4432+ LOG .info ("{} copyBlock: Starting thread to transfer block {} from {} to {} ({})" ,
4433+ getDatanodeInfo (), sourceBlk , this .getDatanodeUuid (), targetDn .getDatanodeUuid (), targetDn );
44344434 Future <?> result ;
44354435 if (this .getDatanodeUuid ().equals (targetDn .getDatanodeUuid ())) {
44364436 result = copyBlockCrossNamespaceExecutor .submit (new LocalBlockCopy (sourceBlk , targetBlk ));
@@ -4485,15 +4485,14 @@ public Boolean call() throws IOException {
44854485
44864486 BlockLocalPathInfo srcBlpi = data .getBlockLocalPathInfo (sourceBlk );
44874487 BlockLocalPathInfo dstBlpi = data .getBlockLocalPathInfo (targetBlk );
4488- LOG .info (
4489- getClass ().getSimpleName () + ": Hardlinked " + sourceBlk + "( " + srcBlpi .getBlockPath ()
4490- + " " + srcBlpi .getMetaPath () + " ) " + "to " + targetBlk + "( "
4491- + dstBlpi .getBlockPath () + " " + dstBlpi .getMetaPath () + " ) " );
4488+ LOG .info ("{}: Hardlinked {} ( {} {} ) to {} ( {} {} )." , getClass ().getSimpleName (),
4489+ sourceBlk , srcBlpi .getBlockPath (), srcBlpi .getMetaPath (), targetBlk ,
4490+ dstBlpi .getBlockPath (), dstBlpi .getMetaPath ());
44924491
44934492 metrics .incrBlocksReplicatedViaHardlink ();
44944493 } catch (IOException e ) {
4495- LOG .warn ("Local block copy for src : " + sourceBlk .getBlockName () + ", dst : "
4496- + targetBlk .getBlockName () + " failed" , e );
4494+ LOG .warn ("Local block copy from {} to {} failed: {}" , sourceBlk .getBlockName (),
4495+ targetBlk .getBlockName (), e );
44974496 throw e ;
44984497 }
44994498 return true ;
0 commit comments