Skip to content

Commit

Permalink
XrdApps::JCache: by default don't write JSON summary files
Browse files Browse the repository at this point in the history
apeters1971 committed Jun 13, 2024
1 parent f1aeb02 commit aac49e9
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/XrdApps/XrdClJCachePlugin/README.md
Original file line number Diff line number Diff line change
@@ -30,15 +30,16 @@ vector = false
journal = true
summary = true
size = 0
json = ./
json =

```
```cache``` points to a local or shared directory where accessed files are stored. This directory has to exist and the configuration path should be terminated with a '/'.

> [!TIP]
> By default JCache prints a summary at application exit. If you don't want the summary set ```summary = false```.
> [!TIP]
> By default JCache writes a JSON summary file into the current working directory. If you want to change the directory where json summaries are stored change ```json = /tmp/```. If you don't want any json summary file set it to an empty string. The name of the json summary file is ```jcache.env{"XRD_APPNAME"}:"none".{pid}.json```
> By default JCache does not write a JSON summary. If you want JSON summaries define a directory whare stored change ```json = /tmp/```. If you don't want any json summary file use the defualt or set it to an empty string. The name of the json summary file is ```jcache.env{"XRD_APPNAME"}:"none".{pid}.json```
> [!NOTE]
> The easiest way to verifyt the plug-in functionning is to run with ```XRD_LOGLEVEL=Info``` since the plug-in will provide
2 changes: 1 addition & 1 deletion src/XrdApps/XrdClJCachePlugin/file/XrdClJCacheFile.cc
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
/*----------------------------------------------------------------------------*/

std::string XrdCl::JCacheFile::sCachePath = "";
std::string XrdCl::JCacheFile::sJsonPath = "./";
std::string XrdCl::JCacheFile::sJsonPath = "";
bool XrdCl::JCacheFile::sEnableJournalCache = true;
bool XrdCl::JCacheFile::sEnableVectorCache = false;
bool XrdCl::JCacheFile::sEnableSummary = true;
2 changes: 1 addition & 1 deletion src/XrdApps/XrdClJCachePlugin/plugin/XrdClJCachePlugin.hh
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ public:
JCacheFile::SetJournal(itj != config->end() ? itj->second == "true"
: true);
auto itjson = config->find("json");
JCacheFile::SetJsonPath(itjson != config->end() ? itjson->second : "./");
JCacheFile::SetJsonPath(itjson != config->end() ? itjson->second : "");

auto its = config->find("summary");
JCacheFile::SetSummary(its != config->end() ? its->second == "true"

0 comments on commit aac49e9

Please sign in to comment.