Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the ability to create segments in v8 format #4420

Merged
merged 9 commits into from Jun 26, 2017

Conversation

leventov
Copy link
Member

Fixes #4235

This PR changes the behaviour of:

  • HadoopConverterJob, which used to produce segments in v8 format. Now it produces segments in v9 format.
  • ConvertSegmentTask which delegates to IndexIO.convertSegment(), used to produce a segment in v8 format if given a segment in v9 format, that I believe was a bug.

@leventov leventov added this to the 0.11.0 milestone Jun 16, 2017
@jon-wei jon-wei self-assigned this Jun 17, 2017
indexLoadersBuilder.put(i, legacyIndexLoader);
}
indexLoadersBuilder.put((int) V9_VERSION, new V9IndexLoader(columnConfig));
indexLoaders = indexLoadersBuilder.build();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

marker for my self LGTM to this point.

Copy link
Contributor

@jihoonson jihoonson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch looks good to me. Thanks @leventov.

@@ -119,7 +116,7 @@ public Plumber findPlumber(
final Set<File> spilled = Sets.newHashSet();

// IndexMerger implementation.
final IndexMerger theIndexMerger = config.getBuildV9Directly() ? indexMergerV9 : indexMerger;
final IndexMerger theIndexMerger = indexMergerV9;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The theIndexMerger variable can be simply removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

case LONG:
builder.setValueType(ValueType.LONG);
builder.addSerde(
LongGenericColumnPartSerde.legacySerializerBuilder()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we do not need all those legacy Ser/Des ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

ValueType type = valueTypes.get(metric);
switch (type) {
case LONG:
metWriters.add(new LongMetricColumnSerializer(metric, v8OutDir, ioPeon, metCompression, longEncoding));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here do we still need MetricColumnSerializer ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing, removed

final DimensionHandler[] handlers = makeDimensionHandlers(mergedDimensions, dimCapabilities);
final List<DimensionMerger> mergers = new ArrayList<>();
for (int i = 0; i < mergedDimensions.size(); i++) {
DimensionMergerLegacy merger = handlers[i].makeLegacyMerger(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This DimensionMergerLegacy can go too i guess

/**
*/
public class IndexMerger
@ImplementedBy(IndexMergerV9.class)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we expect that this class to be injected via other modules ? or it is to make code look nicer ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is injected somewhere in indexing already. Other implementation is expected with segment format v10.

@b-slim
Copy link
Contributor

b-slim commented Jun 23, 2017

Overall LGTM there is some unused classes that can be removed.

@leventov
Copy link
Member Author

@jon-wei @b-slim any more comments?

@b-slim
Copy link
Contributor

b-slim commented Jun 26, 2017

👍

@jon-wei
Copy link
Contributor

jon-wei commented Jun 26, 2017

LGTM, 👍

@jon-wei jon-wei merged commit 05d5868 into apache:master Jun 26, 2017
@leventov leventov deleted the no-v8-merge branch June 26, 2017 20:21
leventov pushed a commit to metamx/druid that referenced this pull request Jul 19, 2017
commit 11f2eaa
Author: dmitry.golitsyn <golitsyn.dima@gmail.com>
Date:   Tue Jun 27 21:15:42 2017 +0300

    Replace putIfAbsent with computeIfAbsent in DruidBalancer

commit 574587b
Author: dmitry.golitsyn <golitsyn.dima@gmail.com>
Date:   Tue Jun 27 16:01:25 2017 +0300

    Do not remove segment that should not be moved from currentlyMovingSegments (segments are removed by callbacks or not inserted)

commit 7a261c8
Author: Jihoon Son <jihoonson@apache.org>
Date:   Tue Jun 27 10:51:48 2017 +0900

    Split travis test (apache#4468)

commit 05d5868
Author: Roman Leventov <leventov.ru@gmail.com>
Date:   Mon Jun 26 15:21:39 2017 -0500

    Remove the ability to create segments in v8 format (apache#4420)

    * Remove ability to create segments in v8 format

    * Fix IndexGeneratorJobTest

    * Fix parameterized test name in IndexMergerTest

    * Remove extra legacy merging stuff

    * Remove legacy serializer builders

    * Remove ConciseBitmapIndexMergerTest and RoaringBitmapIndexMergerTest
Do not remove segment that should not be moved from currentlyMovingSegments (segments are removed by callbacks or not inserted)

Replace putIfAbsent with computeIfAbsent in DruidBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants