-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Conversation
indexLoadersBuilder.put(i, legacyIndexLoader); | ||
} | ||
indexLoadersBuilder.put((int) V9_VERSION, new V9IndexLoader(columnConfig)); | ||
indexLoaders = indexLoadersBuilder.build(); |
There was a problem hiding this comment.
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.
There was a problem hiding this 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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
Overall LGTM there is some unused classes that can be removed. |
👍 |
LGTM, 👍 |
commit 11f2eaa Author: dmitry.golitsyn <[email protected]> Date: Tue Jun 27 21:15:42 2017 +0300 Replace putIfAbsent with computeIfAbsent in DruidBalancer commit 574587b Author: dmitry.golitsyn <[email protected]> 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 <[email protected]> Date: Tue Jun 27 10:51:48 2017 +0900 Split travis test (apache#4468) commit 05d5868 Author: Roman Leventov <[email protected]> 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
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 toIndexIO.convertSegment()
, used to produce a segment in v8 format if given a segment in v9 format, that I believe was a bug.