diff --git a/modules/dcache/src/main/java/diskCacheV111/poolManager/PoolMonitorV5.java b/modules/dcache/src/main/java/diskCacheV111/poolManager/PoolMonitorV5.java index 9eadc8ccf6b..d12981c5279 100644 --- a/modules/dcache/src/main/java/diskCacheV111/poolManager/PoolMonitorV5.java +++ b/modules/dcache/src/main/java/diskCacheV111/poolManager/PoolMonitorV5.java @@ -35,6 +35,7 @@ import diskCacheV111.vehicles.PoolManagerPoolInformation; import diskCacheV111.vehicles.ProtocolInfo; import diskCacheV111.vehicles.StorageInfo; +import diskCacheV111.vehicles.StorageInfos; import dmg.cells.nucleus.CellMessage; @@ -148,7 +149,7 @@ private PoolPreferenceLevel[] match(DirectionType direction) return _selectionUnit.match(direction, hostName, protocol, - _fileAttributes.getStorageInfo(), + StorageInfos.extractFrom(_fileAttributes), _linkGroup); } @@ -182,7 +183,7 @@ public PoolInfo selectWritePool(long preallocated) if (levels.length == 0) { throw new CacheException(19, "No write pools configured for <" + - _fileAttributes.getStorageInfo() + + StorageInfos.extractFrom(_fileAttributes) + "> in the linkGroup " + (_linkGroup == null ? "[none]" : _linkGroup)); } @@ -198,7 +199,7 @@ public PoolInfo selectWritePool(long preallocated) } throw new CacheException(20, - "No write pool available for <" + _fileAttributes.getStorageInfo() + + "No write pool available for <" + StorageInfos.extractFrom(_fileAttributes) + "> in the linkGroup " + (_linkGroup == null ? "[none]" : _linkGroup)); } @@ -516,7 +517,7 @@ public static Set getRequiredAttributesForFileLocality() return FileLocality.NONE; } - StorageInfo storageInfo = attributes.getStorageInfo(); + StorageInfo storageInfo = StorageInfos.extractFrom(attributes); PoolPreferenceLevel[] levels = _selectionUnit.match(DirectionType.READ, hostName, diff --git a/modules/dcache/src/main/java/org/dcache/pool/classic/SpaceSweeper2.java b/modules/dcache/src/main/java/org/dcache/pool/classic/SpaceSweeper2.java index 43996348162..f8030921e21 100644 --- a/modules/dcache/src/main/java/org/dcache/pool/classic/SpaceSweeper2.java +++ b/modules/dcache/src/main/java/org/dcache/pool/classic/SpaceSweeper2.java @@ -16,6 +16,7 @@ import diskCacheV111.util.CacheException; import diskCacheV111.util.FileNotInCacheException; import diskCacheV111.util.PnfsId; +import diskCacheV111.vehicles.StorageInfos; import dmg.util.Args; import dmg.util.Formats; @@ -258,7 +259,7 @@ public String ac_sweeper_ls(Args args) if (s) { FileAttributes attributes = entry.getFileAttributes(); if (attributes.isDefined(FileAttribute.STORAGEINFO)) { - sb.append("\n ").append(attributes.getStorageInfo()); + sb.append("\n ").append(StorageInfos.extractFrom(attributes)); } } sb.append("\n"); diff --git a/modules/dcache/src/main/java/org/dcache/pool/movers/DCapClientProtocol_1.java b/modules/dcache/src/main/java/org/dcache/pool/movers/DCapClientProtocol_1.java index 985d2450f3d..22f2d94ef1b 100644 --- a/modules/dcache/src/main/java/org/dcache/pool/movers/DCapClientProtocol_1.java +++ b/modules/dcache/src/main/java/org/dcache/pool/movers/DCapClientProtocol_1.java @@ -23,6 +23,7 @@ import diskCacheV111.vehicles.DCapClientProtocolInfo; import diskCacheV111.vehicles.ProtocolInfo; import diskCacheV111.vehicles.StorageInfo; +import diskCacheV111.vehicles.StorageInfos; import dmg.cells.nucleus.CellEndpoint; import dmg.cells.nucleus.CellMessage; @@ -74,7 +75,7 @@ public void runIO(FileAttributes fileAttributes, throws Exception { PnfsId pnfsId = fileAttributes.getPnfsId(); - StorageInfo storage = fileAttributes.getStorageInfo(); + StorageInfo storage = StorageInfos.extractFrom(fileAttributes); say("runIO()\n\tprotocol="+ protocol+",\n\tStorageInfo="+storage+",\n\tPnfsId="+pnfsId+ ",\n\taccess ="+access); diff --git a/modules/dcache/src/main/java/org/dcache/pool/movers/RemoteGsiftpTransferProtocol_1.java b/modules/dcache/src/main/java/org/dcache/pool/movers/RemoteGsiftpTransferProtocol_1.java index 5f6c8ba6dc3..f0391db2727 100644 --- a/modules/dcache/src/main/java/org/dcache/pool/movers/RemoteGsiftpTransferProtocol_1.java +++ b/modules/dcache/src/main/java/org/dcache/pool/movers/RemoteGsiftpTransferProtocol_1.java @@ -90,6 +90,7 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING import diskCacheV111.util.PnfsId; import diskCacheV111.vehicles.ProtocolInfo; import diskCacheV111.vehicles.StorageInfo; +import diskCacheV111.vehicles.StorageInfos; import diskCacheV111.vehicles.transferManager.RemoteGsiftpTransferProtocolInfo; import dmg.cells.nucleus.CellEndpoint; @@ -174,11 +175,12 @@ public void runIO(FileAttributes fileAttributes, CredentialException, GSSException { _pnfsId = fileAttributes.getPnfsId(); - StorageInfo storage = fileAttributes.getStorageInfo(); - _log.debug("runIO()\n\tprotocol=" - + protocol + ",\n\tStorageInfo=" + storage + ",\n\tPnfsId=" - + _pnfsId + ",\n\taccess =" - + access ); + if (_log.isDebugEnabled()) { + _log.debug("runIO()\n\tprotocol=" + + protocol + ",\n\tStorageInfo=" + StorageInfos.extractFrom(fileAttributes) + ",\n\tPnfsId=" + + _pnfsId + ",\n\taccess =" + + access ); + } if (!(protocol instanceof RemoteGsiftpTransferProtocolInfo)) { throw new CacheException("protocol info is not RemoteGsiftpransferProtocolInfo"); } @@ -203,11 +205,11 @@ public void runIO(FileAttributes fileAttributes, if ( access == IoMode.WRITE) { gridFTPRead(remoteGsiftpProtocolInfo, - storage, + fileAttributes.getStorageInfo(), allocator); } else { gridFTPWrite(remoteGsiftpProtocolInfo, - storage); + fileAttributes.getStorageInfo()); } _log.debug(" runIO() done"); } diff --git a/modules/dcache/src/main/java/org/dcache/pool/movers/RemoteHttpDataTransferProtocol_1.java b/modules/dcache/src/main/java/org/dcache/pool/movers/RemoteHttpDataTransferProtocol_1.java index 9845309594b..546b5ea217a 100644 --- a/modules/dcache/src/main/java/org/dcache/pool/movers/RemoteHttpDataTransferProtocol_1.java +++ b/modules/dcache/src/main/java/org/dcache/pool/movers/RemoteHttpDataTransferProtocol_1.java @@ -16,7 +16,7 @@ import diskCacheV111.util.PnfsId; import diskCacheV111.vehicles.ProtocolInfo; import diskCacheV111.vehicles.RemoteHttpDataTransferProtocolInfo; -import diskCacheV111.vehicles.StorageInfo; +import diskCacheV111.vehicles.StorageInfos; import dmg.cells.nucleus.CellEndpoint; @@ -49,9 +49,10 @@ public void runIO(FileAttributes fileAttributes, throws CacheException, IOException, InterruptedException { PnfsId pnfsId = fileAttributes.getPnfsId(); - StorageInfo storage = fileAttributes.getStorageInfo(); - _log.info("Active HTTP: Protocol={}, StorageInfo={}, PnfsId={}, Access={}", - protocol, storage, pnfsId, access); + if (_log.isInfoEnabled()) { + _log.info("Active HTTP: Protocol={}, StorageInfo={}, PnfsId={}, Access={}", + protocol, StorageInfos.extractFrom(fileAttributes), pnfsId, access); + } if (!(protocol instanceof RemoteHttpDataTransferProtocolInfo)) { throw new CacheException("protocol info is not RemoteHttpDataTransferProtocolInfo"); }