1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-15 12:09:09 +03:00

Added some add'l stubs for key manipulation

This commit is contained in:
Patrick LeBlanc
2019-03-20 14:23:43 -05:00
parent 0b4cbad829
commit fe66382580
2 changed files with 42 additions and 6 deletions

View File

@@ -162,12 +162,13 @@ int MetadataFile::updateMetadata(const char *filename)
write_json(metadataFilename, jsontree);
}
string MetadataFile::getNewKeyFromOldKey(const string &oldKey)
string MetadataFile::getNewKeyFromOldKey(string oldKey, size_t length)
{
boost::uuids::uuid u;
string ret(oldKey);
strcpy(&ret[0], boost::uuids::to_string(u).c_str());
return ret;
if (length != 0)
setLength(oldKey, length);
strcpy(&oldKey[0], boost::uuids::to_string(u).c_str());
return oldKey;
}
string MetadataFile::getNewKey(string sourceName, size_t offset, size_t length)
@@ -187,6 +188,29 @@ string MetadataFile::getNewKey(string sourceName, size_t offset, size_t length)
return ss.str();
}
off_t MetadataFile::getOffsetFromKey(const string &key)
{
return 0;
}
string MetadataFile::getSourceFromKey(const string &key)
{
return "dookie";
}
size_t MetadataFile::getLengthFromKey(const string &key)
{
return 0;
}
void MetadataFile::setOffset(string &key, off_t newOffset)
{
}
void MetadataFile::setLength(string &key, size_t newLength)
{
}
void MetadataFile::printObjects()
{
printf("Version: %i Revision: %i\n",mVersion,mRevision);
@@ -196,6 +220,9 @@ void MetadataFile::printObjects()
}
}
void MetadataFile::updateEntry(off_t offset, const string &newName, size_t newLength)
{
}
}