@@ -94,26 +94,13 @@ EOSMGMNAMESPACE_BEGIN
9494// /eos/<instance>/proc/recycle/
9595std::string Recycle::gRecyclingPrefix = " /recycle/" ;
9696std::string Recycle::gRecyclingAttribute = " sys.recycle" ;
97- std::string Recycle::gRecyclingTimeAttribute = " sys.recycle.keeptime" ;
98- std::string Recycle::gRecyclingKeepRatio = " sys.recycle.keepratio" ;
99- std::string Recycle::gRecyclingCollectInterval = " sys.recycle.collectinterval" ;
100- std::string Recycle::gRecyclingRemoveInterval = " sys.recycle.removeinterval" ;
101- std::string Recycle::gRecyclingDryRunAttribute = " sys.recycle.dryrun" ;
97+ std::string Recycle::gRecyclingPostFix = " .d" ;
10298std::string Recycle::gRecyclingVersionKey = " sys.recycle.version.key" ;
10399std::string Recycle::gRecycleIdXattrKey = " sys.forced.recycleid" ;
104- std::string Recycle::gRecyclingPostFix = " .d" ;
105100eos::common::VirtualIdentity Recycle::mRootVid =
106101 eos::common::VirtualIdentity::Root ();
107102std::chrono::seconds Recycle::mLastRemoveTs = std::chrono::seconds(0 );
108103
109- // ------------------------------------------------------------------------------
110- // Default constructor
111- // ------------------------------------------------------------------------------
112- Recycle::Recycle (bool fake_clock) :
113- mPath(" " ), mRecycleDir(" " ), mRecyclePath(" " ), mOwnerUid(DAEMONUID),
114- mOwnerGid(DAEMONGID), mId(0 ), mClock(fake_clock)
115- {}
116-
117104// ------------------------------------------------------------------------------
118105// Collect entries to recycle based on the current policy
119106// ------------------------------------------------------------------------------
@@ -714,45 +701,32 @@ Recycle::Print(std::string& std_out, std::string& std_err,
714701 unsigned long long used_inodes = map_quotas[SpaceQuota::kGroupFilesIs ];
715702 unsigned long long max_inodes = map_quotas[SpaceQuota::kGroupFilesTarget ];
716703 char sline[4096 ];
717- eos::IContainerMD::XAttrMap attrmap;
718- XrdOucErrInfo error;
719-
720- // Check if this path has a recycle attribute
721- if (gOFS ->_attr_ls (Recycle::gRecyclingPrefix .c_str (), error, mRootVid , " " ,
722- attrmap)) {
723- eos_static_err (" msg=\" unable to get attribute on recycle path\" "
724- " recycle-path=%s" , Recycle::gRecyclingPrefix .c_str ());
725- }
726704
727705 if (!monitoring) {
728706 oss_out << " # _________________________________________________________"
729707 << " ___________________________________________________________"
730708 << " ___________________________" << std::endl;
731709 snprintf (sline, sizeof (sline) - 1 , " # used %s out of %s (%.02f%% volume) "
732- " used %llu out of %llu (%.02f%% inodes used) Object-Lifetime %s [s] Keep-Ratio %s " ,
710+ " used %llu out of %llu (%.02f%% inodes used) Object-Lifetime %lu [s] Keep-Ratio %.02f " ,
733711 StringConversion::GetReadableSizeString (used_bytes, " B" ).c_str (),
734712 StringConversion::GetReadableSizeString (max_bytes, " B" ).c_str (),
735713 used_bytes * 100.0 / max_bytes,
736714 used_inodes, max_inodes, used_inodes * 100.0 / max_inodes,
737- attrmap.count (Recycle::gRecyclingTimeAttribute ) ?
738- attrmap[Recycle::gRecyclingTimeAttribute ].c_str () : " not configured" ,
739- attrmap.count (Recycle::gRecyclingKeepRatio ) ?
740- attrmap[Recycle::gRecyclingKeepRatio ].c_str () : " not configured" );
715+ gOFS ->mRecycler ->GetKeepTime (),
716+ gOFS ->mRecycler ->GetKeepRatio ());
741717 oss_out << sline << std::endl
742718 << " # _________________________________________________________"
743719 << " ___________________________________________________________"
744720 << " ___________________________" << std::endl;
745721 } else {
746722 snprintf (sline, sizeof (sline) - 1 , " recycle-bin=%s usedbytes=%llu "
747723 " maxbytes=%llu volumeusage=%.02f%% usedinodes=%llu "
748- " maxinodes=%llu inodeusage=%.02f%% lifetime=%s ratio=%s " ,
724+ " maxinodes=%llu inodeusage=%.02f%% lifetime=%lu ratio=%.02f " ,
749725 Recycle::gRecyclingPrefix .c_str (),
750726 used_bytes, max_bytes, used_bytes * 100.0 / max_bytes,
751727 used_inodes, max_inodes, used_inodes * 100.0 / max_inodes,
752- attrmap.count (Recycle::gRecyclingTimeAttribute ) ?
753- attrmap[Recycle::gRecyclingTimeAttribute ].c_str () : " -1" ,
754- attrmap.count (Recycle::gRecyclingKeepRatio ) ?
755- attrmap[Recycle::gRecyclingKeepRatio ].c_str () : " -1" );
728+ gOFS ->mRecycler ->GetKeepTime (),
729+ gOFS ->mRecycler ->GetKeepRatio ());
756730 oss_out << sline << std::endl;
757731 }
758732 }
0 commit comments