Skip to content

Commit

Permalink
use name instead of inode_name
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoud Ismail committed Jun 1, 2016
1 parent fac167f commit 4387b83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/DatasetTableTailer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ using namespace Utils::NdbC;
using namespace Utils::ElasticSearch;

const char* _dataset_table= "dataset";
const int _dataset_noCols= 6;
const int _dataset_noCols= 7;
const char* _dataset_cols[_dataset_noCols]=
{"inode_id",
"inode_pid",
"inode_name",
"projectId",
"description",
"public_ds"
"public_ds",
"searchable"
};

const int _dataset_noEvents = 3;
Expand Down Expand Up @@ -105,7 +106,7 @@ void DatasetTableTailer::handleEvent(NdbDictionary::Event::TableEvent eventType,
docWriter.String("parent_id");
docWriter.Int(value[1]->int32_value());

docWriter.String("inode_name");
docWriter.String("name");
docWriter.String(get_string(value[2]).c_str());

docWriter.String("project_id");
Expand All @@ -119,6 +120,11 @@ void DatasetTableTailer::handleEvent(NdbDictionary::Event::TableEvent eventType,
docWriter.String("public_ds");
docWriter.Bool(public_ds);

bool searchable = value[6]->int8_value() == 1;

docWriter.String("searchable");
docWriter.Bool(searchable);

docWriter.EndObject();
docWriter.String("doc_as_upsert");
docWriter.Bool(true);
Expand Down
2 changes: 1 addition & 1 deletion src/ProjectTableTailer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void ProjectTableTailer::handleEvent(NdbDictionary::Event::TableEvent eventType,
docWriter.String("parent_id");
docWriter.Int(value[1]->int32_value());

docWriter.String("inode_name");
docWriter.String("name");
docWriter.String(get_string(value[2]).c_str());

docWriter.String("user");
Expand Down

0 comments on commit 4387b83

Please sign in to comment.