archive.hpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*##############################################################################
  2. # HPCC SYSTEMS software Copyright (C) 2020 HPCC Systems®.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ##############################################################################
  16. */
  17. #ifndef _ARCHIVE_HPP__
  18. #define _ARCHIVE_HPP__
  19. #include "jstring.hpp"
  20. #include "jptree.hpp"
  21. #include "jtime.hpp"
  22. #include "jfile.hpp"
  23. #include "jutil.hpp"
  24. #include "ws_decoupledlogging.hpp"
  25. class CArchiveTankFileHelper : public CSimpleInterface
  26. {
  27. Owned<IClientWSDecoupledLog> client;
  28. StringAttr logServer, groupName;
  29. StringBuffer archiveToDir;
  30. IClientGetAckedLogFilesResponse* getAckedLogFiles();
  31. bool validateAckedLogFiles(IArrayOf<IConstLogAgentGroupTankFiles>& ackedLogFilesInGroups);
  32. void archiveAckedLogFilesForLogAgentGroup(const char* groupName, const char* tankFileDir, StringArray& ackedLogFiles);
  33. void cleanAckedLogFilesForLogAgentGroup(const char* groupName, StringArray& ackedLogFiles);
  34. public:
  35. CArchiveTankFileHelper(IProperties* input);
  36. void archive();
  37. };
  38. IClientWSDecoupledLog* createLogServerClient(IProperties* input);
  39. void archiveTankFiles(IProperties* input);
  40. #endif