forked from ydb-platform/ydb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial implementation of QStorage over Ydb (ydb-platform#4128)
- Loading branch information
Showing
7 changed files
with
480 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ RECURSE( | |
interface | ||
memory | ||
ut_common | ||
ydb | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
UNITTEST_FOR(ydb/library/yql/core/qplayer/storage/ydb) | ||
|
||
SRCS( | ||
yql_qstorage_ydb_ut.cpp | ||
) | ||
|
||
PEERDIR( | ||
ydb/library/yql/core/qplayer/storage/ut_common | ||
) | ||
|
||
END() |
31 changes: 31 additions & 0 deletions
31
ydb/library/yql/core/qplayer/storage/ydb/ut/yql_qstorage_ydb_ut.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include <ydb/library/yql/core/qplayer/storage/ydb/yql_qstorage_ydb.h> | ||
|
||
#include <library/cpp/testing/unittest/registar.h> | ||
|
||
#include <ydb/library/yql/core/qplayer/storage/ut_common/yql_qstorage_ut_common.h> | ||
|
||
#include <util/generic/guid.h> | ||
#include <util/system/env.h> | ||
|
||
using namespace NYql; | ||
|
||
IQStoragePtr MakeTestYdbQStorage() { | ||
TYdbQStorageSettings settings; | ||
settings.Token = GetEnv("YDB_TOKEN"); | ||
settings.Endpoint = GetEnv("YDB_QSTORAGE_ENDPOINT"); | ||
if (!settings.Endpoint) { | ||
Cerr << "YDB_QSTORAGE_ENDPOINT is not set"; | ||
return nullptr; | ||
} | ||
|
||
settings.Database = GetEnv("YDB_QSTORAGE_DATABASE"); | ||
settings.TablesPrefix = GetEnv("YDB_QSTORAGE_TABLES_PREFIX"); | ||
settings.OperationIdPrefix = CreateGuidAsString() + "_"; | ||
settings.PartBytes = 2; | ||
settings.MaxBatchSize = 30; | ||
return MakeYdbQStorage(settings); | ||
} | ||
|
||
Y_UNIT_TEST_SUITE(TQStorageFileTests) { | ||
GENERATE_TESTS(MakeTestYdbQStorage) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
LIBRARY() | ||
|
||
SRCS( | ||
yql_qstorage_ydb.cpp | ||
) | ||
|
||
PEERDIR( | ||
ydb/library/yql/core/qplayer/storage/interface | ||
ydb/library/yql/core/qplayer/storage/memory | ||
ydb/public/sdk/cpp/client/ydb_table | ||
library/cpp/digest/old_crc | ||
) | ||
|
||
END() | ||
|
||
RECURSE_FOR_TESTS( | ||
ut | ||
) |
Oops, something went wrong.