You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by mp...@apache.org on 2018/12/19 00:02:47 UTC
[1/2] kudu git commit: Fix typo in ASAN cmake command
Repository: kudu
Updated Branches:
refs/heads/master 7663c94db -> aeda712e2
Fix typo in ASAN cmake command
Change-Id: I049679199d9fd3398a857f89a0e919e7bac1c628
Reviewed-on: http://gerrit.cloudera.org:8080/12098
Tested-by: Will Berkeley <wd...@gmail.com>
Reviewed-by: Andrew Wong <aw...@cloudera.com>
Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/421f7ecd
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/421f7ecd
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/421f7ecd
Branch: refs/heads/master
Commit: 421f7ecd4def40f0eb90b9916f8c0f63eadaa7c7
Parents: 7663c94
Author: Will Berkeley <wd...@gmail.org>
Authored: Fri Dec 14 22:00:51 2018 -0800
Committer: Andrew Wong <aw...@cloudera.com>
Committed: Sat Dec 15 06:18:01 2018 +0000
----------------------------------------------------------------------
README.adoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kudu/blob/421f7ecd/README.adoc
----------------------------------------------------------------------
diff --git a/README.adoc b/README.adoc
index 79d338e..b796721 100644
--- a/README.adoc
+++ b/README.adoc
@@ -121,7 +121,7 @@ $ mkdir -p build/asan
$ cd build/asan
$ CC=../../thirdparty/clang-toolchain/bin/clang \
CXX=../../thirdparty/clang-toolchain/bin/clang++ \
- ./../thirdparty/installed/common/bin/cmake \
+ ../../thirdparty/installed/common/bin/cmake \
-DKUDU_USE_ASAN=1 ../..
$ make -j8
$ ctest -j8
[2/2] kudu git commit: delta_store: add nulls to fuzz tests
Posted by mp...@apache.org.
delta_store: add nulls to fuzz tests
It was easy enough and it provides some additional test coverage.
Change-Id: I310ebc47e95898e50c3b2052a88a336b7d3f54f1
Reviewed-on: http://gerrit.cloudera.org:8080/11994
Tested-by: Kudu Jenkins
Reviewed-by: Mike Percy <mp...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/aeda712e
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/aeda712e
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/aeda712e
Branch: refs/heads/master
Commit: aeda712e2a48029eb36265e418bdc041eed97cff
Parents: 421f7ec
Author: Adar Dembo <ad...@cloudera.com>
Authored: Mon Nov 26 21:11:33 2018 -0800
Committer: Mike Percy <mp...@apache.org>
Committed: Tue Dec 18 23:25:19 2018 +0000
----------------------------------------------------------------------
src/kudu/tablet/deltafile-test.cc | 14 +++++++++-----
src/kudu/tablet/deltamemstore-test.cc | 14 +++++++++-----
src/kudu/tablet/tablet-test-util.h | 15 +++++++++++----
3 files changed, 29 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kudu/blob/aeda712e/src/kudu/tablet/deltafile-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltafile-test.cc b/src/kudu/tablet/deltafile-test.cc
index aed693c..5307579 100644
--- a/src/kudu/tablet/deltafile-test.cc
+++ b/src/kudu/tablet/deltafile-test.cc
@@ -442,23 +442,27 @@ TYPED_TEST(DeltaTypeTestDeltaFile, TestFuzz) {
const int kNumDeltas = 10000;
const std::pair<uint64_t, uint64_t> kTimestampRange(0, 100);
- // Build a schema with kNumColumns columns.
+ // Build a schema with kNumColumns columns, some of which are nullable.
+ Random prng(SeedRandom());
SchemaBuilder sb;
for (int i = 0; i < kNumColumns; i++) {
- ASSERT_OK(sb.AddColumn(Substitute("col$0", i), UINT32));
+ if (prng.Uniform(10) == 0) {
+ ASSERT_OK(sb.AddNullableColumn(Substitute("col$0", i), UINT32));
+ } else {
+ ASSERT_OK(sb.AddColumn(Substitute("col$0", i), UINT32));
+ }
}
Schema schema(sb.Build());
- Random r(SeedRandom());
MirroredDeltas<TypeParam> deltas(&schema);
shared_ptr<DeltaFileReader> reader;
ASSERT_OK(CreateRandomDeltaFile<TypeParam>(
- schema, this->fs_manager_.get(), &r,
+ schema, this->fs_manager_.get(), &prng,
kNumDeltas, { 0, kNumRows }, kTimestampRange, &deltas, &reader));
NO_FATALS(RunDeltaFuzzTest<TypeParam>(
- *reader, &r, &deltas, kTimestampRange,
+ *reader, &prng, &deltas, kTimestampRange,
/*test_filter_column_ids_and_collect_deltas=*/true));
}
http://git-wip-us.apache.org/repos/asf/kudu/blob/aeda712e/src/kudu/tablet/deltamemstore-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltamemstore-test.cc b/src/kudu/tablet/deltamemstore-test.cc
index 3edaa51..89ee619 100644
--- a/src/kudu/tablet/deltamemstore-test.cc
+++ b/src/kudu/tablet/deltamemstore-test.cc
@@ -650,22 +650,26 @@ TEST_F(TestDeltaMemStore, TestFuzz) {
const int kNumDeltas = 10000;
const std::pair<uint64_t, uint64_t> kTimestampRange(0, 100);
- // Build a schema with kNumColumns columns.
+ // Build a schema with kNumColumns columns, some of which are nullable.
+ Random prng(SeedRandom());
SchemaBuilder sb;
for (int i = 0; i < kNumColumns; i++) {
- ASSERT_OK(sb.AddColumn(Substitute("col$0", i), UINT32));
+ if (prng.Uniform(10) == 0) {
+ ASSERT_OK(sb.AddNullableColumn(Substitute("col$0", i), UINT32));
+ } else {
+ ASSERT_OK(sb.AddColumn(Substitute("col$0", i), UINT32));
+ }
}
Schema schema(sb.Build());
- Random r(SeedRandom());
MirroredDeltas<DeltaTypeSelector<REDO>> deltas(&schema);
shared_ptr<DeltaMemStore> dms;
ASSERT_OK(CreateRandomDMS(
- schema, &r, kNumDeltas, { 0, kNumRows }, kTimestampRange, &deltas, &dms));
+ schema, &prng, kNumDeltas, { 0, kNumRows }, kTimestampRange, &deltas, &dms));
NO_FATALS(RunDeltaFuzzTest<DeltaTypeSelector<REDO>>(
- *dms, &r, &deltas, kTimestampRange,
+ *dms, &prng, &deltas, kTimestampRange,
/*test_filter_column_ids_and_collect_deltas=*/false));
}
http://git-wip-us.apache.org/repos/asf/kudu/blob/aeda712e/src/kudu/tablet/tablet-test-util.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet-test-util.h b/src/kudu/tablet/tablet-test-util.h
index 9224cb0..a418941 100644
--- a/src/kudu/tablet/tablet-test-util.h
+++ b/src/kudu/tablet/tablet-test-util.h
@@ -692,10 +692,16 @@ void CreateRandomDeltas(const Schema& schema,
schema.num_columns(),
num_cols_to_update);
for (auto idx : idxs_to_update) {
- uint32_t u32_val = prng->Next();
+ // Pick a random value to assign to the UPDATE. NULL is an option if the
+ // schema supports it.
auto col_id = schema.column_id(idx);
const auto& col = schema.column(idx);
- encoder.AddColumnUpdate(col, col_id, &u32_val);
+ if (col.is_nullable() && prng->Uniform(10) == 0) {
+ encoder.AddColumnUpdate(col, col_id, nullptr);
+ } else {
+ uint32_t u32_val = prng->Next();
+ encoder.AddColumnUpdate(col, col_id, &u32_val);
+ }
}
VLOG(3) << "UPDATE: " << k.row_idx() << "," << k.timestamp().ToString()
<< ": " << encoder.as_changelist().ToString(schema);
@@ -960,8 +966,9 @@ void RunDeltaFuzzTest(const DeltaStore& store,
// Test ApplyUpdates: all relevant updates are applied to the column block.
for (int j = 0; j < opts.projection->num_columns(); j++) {
SCOPED_TRACE(strings::Substitute("Column $0", j));
- ScopedColumnBlock<UINT32> expected_scb(batch_size, false);
- ScopedColumnBlock<UINT32> actual_scb(batch_size, false);
+ bool col_is_nullable = opts.projection->column(j).is_nullable();
+ ScopedColumnBlock<UINT32> expected_scb(batch_size, col_is_nullable);
+ ScopedColumnBlock<UINT32> actual_scb(batch_size, col_is_nullable);
for (int k = 0; k < batch_size; k++) {
expected_scb[k] = 0;
actual_scb[k] = 0;