Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mksahakyan committed Mar 16, 2024
2 parents 111b700 + cbed2f0 commit 6c6b1a8
Show file tree
Hide file tree
Showing 86 changed files with 312 additions and 106 deletions.
2 changes: 1 addition & 1 deletion archetypes/dcache-nearline-plugin-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>archetypes</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
</parent>

<artifactId>dcache-nearline-plugin-archetype</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion archetypes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
</parent>

<artifactId>archetypes</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion docs/TheBook/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>documentation</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
</parent>

<artifactId>TheBook</artifactId>
Expand Down
1 change: 1 addition & 0 deletions docs/TheBook/src/main/markdown/config-billing.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ If you installed dCache following the instructions in the Chapter [Installing dC
```

Use the property `billing.text.dir` to set the location of the log files and the property `billing.enable.text` to control whether the plain-text log files are generated.
To write the logs in JSON format instead of plain text, use the property `billing.format.json=true`.

By default the log files are located in the directory
`/var/lib/dcache/billing`. Under this directory the log files are
Expand Down
2 changes: 1 addition & 1 deletion docs/UserGuide/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>documentation</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
</parent>

<artifactId>UserGuide</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
</parent>

<artifactId>documentation</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion modules/acl-vehicles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/acl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
22 changes: 22 additions & 0 deletions modules/cells/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Cell

This module is responsible for inner-cell communication.


## Celle messages

```mermaid
sequenceDiagram
participant Cell 'A'
create participant cellEndpoint
Cell 'A' ->>+cellEndpoint: send(message) to 'B'
create participant CellMessageDispatcher
cellEndpoint ->>+CellMessageDispatcher:message
CellMessageDispatcher ->>+CellMessageDispatcher:find receiver
participant Cell 'B'
CellMessageDispatcher ->>+Cell 'B': messageArrived(message) from 'A'
```
2 changes: 1 addition & 1 deletion modules/cells/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
1 change: 0 additions & 1 deletion modules/cells/readme

This file was deleted.

2 changes: 1 addition & 1 deletion modules/chimera/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/common-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/common-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/dcache-bulk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/dcache-chimera/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/dcache-dcap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/dcache-frontend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/dcache-ftp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/dcache-gplazma/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/dcache-history/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/dcache-info/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.dcache</groupId>
<artifactId>dcache-parent</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public LinkgroupListDga(CellPath spacemanager, int interval, MessageHandlerChain
public void trigger() {
super.trigger();
LOGGER.trace("Sending linkgroup list request message");
_mhc.sendMessage(_metricLifetime, _spacemanager, new GetLinkGroupNamesMessage());
_mhc.sendMessage(_metricLifetime, _spacemanager, triggerPeriod(),
new GetLinkGroupNamesMessage());
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public void trigger() {
sb.append(" ");
sb.append(item);

_sender.sendMessage(getMetricLifetime(), _handler, _cellPath, sb.toString());
_sender.sendMessage(getMetricLifetime(), _handler, _cellPath,
listRefreshPeriod(), sb.toString());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -42,11 +43,6 @@ public class MessageHandlerChain implements MessageMetadataRepository<UOID>,
private static final long METADATA_FLUSH_THRESHOLD = 3600000; // 1 hour
private static final long METADATA_FLUSH_PERIOD = 600000; // 10 minutes

/**
* Our default timeout for sending messages, in milliseconds
*/
private static final long STANDARD_TIMEOUT = 1000;

private static final Logger LOGGER = LoggerFactory.getLogger(MessageHandlerChain.class);
private final List<MessageHandler> _messageHandler = new LinkedList<>();
private CellEndpoint _endpoint;
Expand Down Expand Up @@ -83,18 +79,19 @@ public String[] listMessageHandlers() {
* @param ttl lifetime of resulting metric, in seconds.
* @param handler the call-back handler for the return message
* @param path the CellPath to target cell
* @param timeout the time to wait for a response, in milliseconds
* @param requestString the String, requesting information
*/
@Override
public void sendMessage(long ttl, CellMessageAnswerable handler,
CellPath path, String requestString) {
CellPath path, long timeout, String requestString) {
if (handler == null) {
LOGGER.error("ignoring attempt to send string-based message without call-back");
return;
}

CellMessage envelope = new CellMessage(path, requestString);
sendMessage(ttl, handler, envelope);
sendMessage(ttl, handler, timeout, envelope);
}


Expand All @@ -103,12 +100,13 @@ public void sendMessage(long ttl, CellMessageAnswerable handler,
*
* @param ttl lifetime of resulting metric, in seconds.
* @param path the CellPath for the recipient of this message
* @param timeout the time to wait for a response, in milliseconds
* @param message the Message payload
*/
@Override
public void sendMessage(long ttl, CellPath path, Message message) {
public void sendMessage(long ttl, CellPath path, long timeout, Message message) {
CellMessage envelope = new CellMessage(path, message);
sendMessage(ttl, null, envelope);
sendMessage(ttl, null, timeout, envelope);
}


Expand All @@ -117,15 +115,16 @@ public void sendMessage(long ttl, CellPath path, Message message) {
*
* @param ttl the metadata for the message
* @param handler the call-back for this method, or null if none should be used.
* @param timeout the time to wait for a response, in milliseconds
* @param envelope the message to send
* @throws SerializationException if the payload isn't serialisable.
*/
@Override
public void sendMessage(long ttl, CellMessageAnswerable handler,
CellMessage envelope) throws SerializationException {
long timeout, CellMessage envelope) throws SerializationException {
putMetricTTL(envelope.getUOID(), ttl);
_endpoint.sendMessage(envelope, handler != null ? handler : this,
MoreExecutors.directExecutor(), STANDARD_TIMEOUT);
MoreExecutors.directExecutor(), timeout);
}

public void setHandlers(List<MessageHandler> handlers) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ public interface MessageSender {
*
* @param ttl how long, in seconds, resulting metrics should last
* @param path the destination for this request
* @param timeout the number of milliseconds to wait for a response.
* @param message the vehicle to send
*/
void sendMessage(long ttl, CellPath path, Message message);
void sendMessage(long ttl, CellPath path, long timeout, Message message);

/**
* Send some arbitrary CellMessage (which includes the payload and the target Cell). The
Expand All @@ -33,9 +34,10 @@ public interface MessageSender {
*
* @param ttl how long, in seconds, resulting metrics should last
* @param handler the object that is to receive reply message
* @param timeout the number of milliseconds to wait for a response.
* @param envelope the complete message envelope to send
*/
void sendMessage(long ttl, CellMessageAnswerable handler,
void sendMessage(long ttl, CellMessageAnswerable handler, long timeout,
CellMessage envelope);

/**
Expand All @@ -49,8 +51,9 @@ void sendMessage(long ttl, CellMessageAnswerable handler,
* @param ttl how long, in seconds, resulting metrics should last
* @param handler the object that is to receive reply message
* @param path the destination for this request
* @param timeout the number of milliseconds to wait for a response.
* @param requestString the String sent to the cell's shell
*/
void sendMessage(long ttl, CellMessageAnswerable handler, CellPath path,
String requestString);
long timeout, String requestString);
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ public void trigger() {
super.trigger();

if (_requestMessage != null) {
_sender.sendMessage(metricLifetime(), null, new CellMessage(_target, _requestMessage));
_sender.sendMessage(metricLifetime(), null, triggerPeriod(),
new CellMessage(_target, _requestMessage));
} else {
_sender.sendMessage(metricLifetime(), _handler, _target, _requestString);
_sender.sendMessage(metricLifetime(), _handler, _target,
triggerPeriod(), _requestString);
}
}

Expand Down
Loading

0 comments on commit 6c6b1a8

Please sign in to comment.