Skip to content

Commit

Permalink
Merge branch 'master' into profile-get-dst
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu authored Nov 16, 2022
2 parents 26c8a87 + 050f9f3 commit 144b687
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/tools/meta-dump/MetaDumpTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "common/time/TimeUtils.h"
#include "common/utils/MetaKeyUtils.h"
#include "meta/ActiveHostsMan.h"
#include "meta/processors/job/JobDescription.h"

DEFINE_string(path, "", "rocksdb instance path");

Expand Down Expand Up @@ -273,6 +274,26 @@ class MetaDumper {
iter->Next();
}
}
{
LOG(INFO) << "------------------------------------------\n\n";
LOG(INFO) << "Job info:";
prefix = MetaKeyUtils::jobPrefix();
iter->Seek(rocksdb::Slice(prefix));
while (iter->Valid() && iter->key().starts_with(prefix)) {
auto key = folly::StringPiece(iter->key().data(), iter->key().size());
auto val = folly::StringPiece(iter->value().data(), iter->value().size());
if (MetaKeyUtils::isJobKey(key)) {
auto jobRet = JobDescription::makeJobDescription(key, val);
auto job = nebula::value(jobRet);
LOG(INFO) << folly::sformat("space id: {}, job id: {}, status: {}",
job.getSpace(),
job.getJobId(),
JobStatus::toString(job.getStatus()));
}

iter->Next();
}
}
if (iter) {
delete iter;
}
Expand Down

0 comments on commit 144b687

Please sign in to comment.