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

release 0.188-tw-0.43 #123

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
4e7977f
[maven-release-plugin] prepare release 0.187
nezihyigitbasi Oct 19, 2017
c8ca80a
[maven-release-plugin] prepare for next development iteration
nezihyigitbasi Oct 19, 2017
bb65b61
Clean up PositionsPageProcessorIterator::processBatch() return value
highker Sep 26, 2017
ef54384
Update ReferenceCountMap method names to be more accurate
highker Oct 12, 2017
c6f1833
Add reference counting to SliceBigArray
highker Oct 11, 2017
7c61d92
Fix code style in ExpressionAnalyzer
findepi Sep 21, 2017
d652085
Fix map access with wrong key generic type
findepi Sep 21, 2017
9355c91
Remove unused method
findepi Oct 3, 2017
cf0d418
Fail when no symbol for field is found
findepi Oct 3, 2017
b08d438
Remove redundant null check
findepi Oct 3, 2017
26b8167
Improve performance of Analysis.getType(Expression)
findepi Oct 3, 2017
168703a
Fix formatting
findepi Oct 3, 2017
8bcd7cd
Add warning message to 0.186 release notes
raghavsethi Oct 20, 2017
cd858e0
Minor fixes for Bing tiles documentation
wenleix Oct 20, 2017
4640232
Fix SHOW FUNCTIONS documentation for stddev
dain Oct 17, 2017
6d2dab7
Fix typo in method name
nezihyigitbasi Oct 23, 2017
901a16f
Expire specialized function cache entries after one hour
wenleix Oct 20, 2017
1101b47
Fix inverted sign for time zones Etc/GMT(+/-)H[H]
Oct 4, 2017
b580545
Add current memory to QueryProgressStats
Oct 23, 2017
669c041
Remove copy of drivers when getting pipeline status
highker Oct 25, 2017
fe9611d
Build immutable map for prepared statements
Oct 25, 2017
2560456
Fix product test for stddev functions
Oct 25, 2017
b257f31
Fix race condition in SpillAwareLookupSourceProvider.close
findepi Oct 20, 2017
6ed99fa
Move S3ConfigurationUpdater to S3 package
electrum Oct 26, 2017
609882f
Add support for using EMRFS with Hive connector
electrum Sep 8, 2017
32c2dd9
Add environment support to db-backed resource manager
nezihyigitbasi Oct 12, 2017
13a595a
Fix merging for JoinOperatorInfo
raghavsethi Oct 16, 2017
45f5fe8
Fix typo in exception message
dyng Oct 22, 2017
bcee065
Fix unused import and update TestJoinOperator
raghavsethi Oct 26, 2017
f46c9a1
Add flattened plan to QueryCompletedEvent
raghavsethi Oct 26, 2017
83cfeff
Fix geospatial function name in docs
wenleix Oct 27, 2017
3b12111
Remove duplicate method in RecordFileWriter
electrum Oct 21, 2017
7d1e59e
Set thread name when removing tasks
electrum Oct 18, 2017
4205481
Update to OkHttp 3.9.0
electrum Oct 6, 2017
678f1b4
Implement cancellation of non-query statements
electrum Jul 10, 2017
0dda10b
Build Javadoc in Travis CI
electrum Oct 16, 2017
1ed9579
Update to Airbase 74 and Airlift 0.154
dain Oct 28, 2017
ebc44d1
Add eager compact option into PagesIndex
wenleix Oct 25, 2017
043ae8b
Make PartitionedLookupSource.close idempotent
findepi Oct 20, 2017
1097bc8
Make PartitionedLookupSource to close underlying LookupSources
findepi Oct 20, 2017
130a525
Add page size stats to HivePageSink
highker Oct 13, 2017
4920ba4
Expire projection and filter cache entries after one hour
wenleix Oct 28, 2017
1127ad0
Create runner in test method and run as single threaded
nezihyigitbasi Oct 31, 2017
c2a4c81
Close runner properly in TestTpchDistributedStats
nezihyigitbasi Oct 31, 2017
b98b483
Update to airlift 0.155
haozhun Oct 31, 2017
aaf7807
Increase test timeout in TestPrestoDriver jdbc test
haozhun Oct 31, 2017
f85ff2f
Run CLI table name completion in separate transaction
electrum Oct 31, 2017
0c8cfb6
Fix transaction support in client and CLI
electrum Oct 31, 2017
dc872ba
Support client tags in resource group selector
Sep 17, 2017
c16af0e
Fix bound check in ArraySliceFunction
highker Nov 1, 2017
9eb8617
Upgrade to slice 0.32
wenleix Jul 9, 2017
2c7f833
Minor style and variable name fix for AbstractMapBlock
wenleix Jul 9, 2017
f91d56d
Avoid memory allocation when copying a whole compact block
wenleix Jul 9, 2017
97897c0
Fix VariableWidthBlockBuilder.copyRegion to return a compact block
wenleix Oct 29, 2017
b9bceeb
Improve SliceArrayBlock.copyRegion perf by skipping compacted slice
wenleix Jul 9, 2017
14c6ef5
Remove incorrect effectiveness check before compacting block
wenleix Jul 9, 2017
a91f0d1
Move ExpressionAnalyzer's Scope to Context
findepi Sep 21, 2017
6d55dd2
Use Scope to resolve lambda arguments in ExpressionAnalyzer
findepi Sep 21, 2017
ac827ea
Support lambda captures using dereference expressions
findepi Sep 21, 2017
e09344a
Introduce Analysis.isColumnReference shorthand
findepi Oct 4, 2017
9721731
Fix planning when lambda argument shadows relation column
findepi Oct 4, 2017
9750c2e
Revert 5 commits that fix analysis/planning for lambda arguments
haozhun Nov 2, 2017
e4cd095
Add release notes for 0.188
haozhun Nov 2, 2017
98ee712
[maven-release-plugin] prepare release 0.188
haozhun Nov 2, 2017
c1ed0b8
Switch the version number to oss base version 0.188
Yaliang Nov 7, 2017
e9305f6
Merge 0.188 version
Yaliang Nov 7, 2017
0360705
Bump up version to 0.188-tw-0.43
Yaliang Nov 7, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ before_script:
script:
- |
if [[ -v MAVEN_CHECKS ]]; then
./mvnw install -DskipTests -B -T C1 -P !twitter-modules
./mvnw install -DskipTests -B -T C1 -P 'ci,!twitter-modules'
fi
- |
if [[ -v TEST_SPECIFIC_MODULES ]]; then
Expand Down
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>io.airlift</groupId>
<artifactId>airbase</artifactId>
<version>72</version>
<version>74</version>
</parent>

<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.187-tw-0.42</version>
<version>0.188-tw-0.43</version>
<packaging>pom</packaging>

<name>presto-root</name>
Expand All @@ -30,7 +30,7 @@
<scm>
<connection>scm:git:git://github.com/twitter-forks/presto.git</connection>
<url>https://github.com/twitter-forks/presto</url>
<tag>0.187-tw-0.42</tag>
<tag>0.188-tw-0.43</tag>
</scm>

<properties>
Expand All @@ -47,11 +47,11 @@
<air.maven.version>3.3.9</air.maven.version>

<dep.antlr.version>4.6</dep.antlr.version>
<dep.airlift.version>0.153</dep.airlift.version>
<dep.airlift.version>0.155</dep.airlift.version>
<dep.packaging.version>${dep.airlift.version}</dep.packaging.version>
<dep.slice.version>0.31</dep.slice.version>
<dep.slice.version>0.32</dep.slice.version>
<dep.aws-sdk.version>1.11.165</dep.aws-sdk.version>
<dep.okhttp.version>3.8.1</dep.okhttp.version>
<dep.okhttp.version>3.9.0</dep.okhttp.version>
<dep.tempto.version>1.36</dep.tempto.version>
<dep.testng.version>6.10</dep.testng.version>
<dep.nifty.version>0.15.1</dep.nifty.version>
Expand Down
2 changes: 1 addition & 1 deletion presto-accumulo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.187-tw-0.42</version>
<version>0.188-tw-0.43</version>
</parent>

<artifactId>presto-accumulo</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-array/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.187-tw-0.42</version>
<version>0.188-tw-0.43</version>
</parent>

<artifactId>presto-array</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void set(long index, Block value)
sizeOfBlocks -= size;
return;
}
if (trackedObjects.decrementReference(object) == 0) {
if (trackedObjects.decrementAndGet(object) == 0) {
// decrement the size only when it is the last reference
sizeOfBlocks -= size;
}
Expand All @@ -80,7 +80,7 @@ public void set(long index, Block value)
sizeOfBlocks += size;
return;
}
if (trackedObjects.incrementReference(object) == 1) {
if (trackedObjects.incrementAndGet(object) == 1) {
// increment the size only when it is the first reference
sizeOfBlocks += size;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ public ReferenceCountMap()
/**
* Increments the reference count of an object by 1 and returns the updated reference count
*/
public int incrementReference(Object key)
public int incrementAndGet(Object key)
{
return addTo(key, 1) + 1;
}

/**
* Decrements the reference count of an object by 1 and returns the updated reference count
*/
public int decrementReference(Object key)
public int decrementAndGet(Object key)
{
int previousCount = addTo(key, -1);
if (previousCount == 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public final class SliceBigArray
private static final int INSTANCE_SIZE = ClassLayout.parseClass(SliceBigArray.class).instanceSize();
private static final int SLICE_INSTANCE_SIZE = ClassLayout.parseClass(Slice.class).instanceSize();
private final ObjectBigArray<Slice> array;
private final ReferenceCountMap trackedSlices = new ReferenceCountMap();
private long sizeOfSlices;

public SliceBigArray()
Expand All @@ -38,7 +39,7 @@ public SliceBigArray(Slice slice)
*/
public long sizeOf()
{
return INSTANCE_SIZE + array.sizeOf() + sizeOfSlices;
return INSTANCE_SIZE + array.sizeOf() + sizeOfSlices + trackedSlices.sizeOf();
}

/**
Expand All @@ -59,24 +60,10 @@ public Slice get(long index)
*/
public void set(long index, Slice value)
{
Slice currentValue = array.get(index);
if (currentValue != null) {
sizeOfSlices -= getSize(currentValue);
}
if (value != null) {
sizeOfSlices += getSize(value);
}
updateRetainedSize(index, value);
array.set(index, value);
}

// For now we approximate the retained size of a slice by object overhead plus length.
// In general this is more complicated than that as there may be multiple "view" slices
// pointing to the same backing memory of a slice.
private long getSize(Slice slice)
{
return slice.length() + SLICE_INSTANCE_SIZE;
}

/**
* Ensures this big array is at least the specified length. If the array is smaller, segments
* are added until the array is larger then the specified length.
Expand All @@ -85,4 +72,33 @@ public void ensureCapacity(long length)
{
array.ensureCapacity(length);
}

private void updateRetainedSize(long index, Slice value)
{
Slice currentValue = array.get(index);
if (currentValue != null) {
int baseReferenceCount = trackedSlices.decrementAndGet(currentValue.getBase());
int sliceReferenceCount = trackedSlices.decrementAndGet(currentValue);
if (baseReferenceCount == 0) {
// it is the last referenced base
sizeOfSlices -= currentValue.getRetainedSize();
}
else if (sliceReferenceCount == 0) {
// it is the last referenced slice
sizeOfSlices -= SLICE_INSTANCE_SIZE;
}
}
if (value != null) {
int baseReferenceCount = trackedSlices.incrementAndGet(value.getBase());
int sliceReferenceCount = trackedSlices.incrementAndGet(value);
if (baseReferenceCount == 1) {
// it is the first referenced base
sizeOfSlices += value.getRetainedSize();
}
else if (sliceReferenceCount == 1) {
// it is the first referenced slice
sizeOfSlices += SLICE_INSTANCE_SIZE;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void testRetainedSizeWithOverlappingBlocks()
}

ReferenceCountMap referenceCountMap = new ReferenceCountMap();
referenceCountMap.incrementReference(block);
referenceCountMap.incrementAndGet(block);
long expectedSize = ClassLayout.parseClass(BlockBigArray.class).instanceSize()
+ referenceCountMap.sizeOf()
+ (new ObjectBigArray()).sizeOf()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.presto.array;

import io.airlift.slice.Slice;
import org.openjdk.jol.info.ClassLayout;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import static io.airlift.slice.SizeOf.sizeOf;
import static io.airlift.slice.Slices.wrappedBuffer;
import static org.testng.Assert.assertEquals;

@Test(singleThreaded = true)
public class TestSliceBigArray
{
private static final long BIG_ARRAY_INSTANCE_SIZE = ClassLayout.parseClass(SliceBigArray.class).instanceSize() + new ReferenceCountMap().sizeOf() + new ObjectBigArray<Slice>().sizeOf();
private static final long SLICE_INSTANCE_SIZE = ClassLayout.parseClass(Slice.class).instanceSize();
private static final int CAPACITY = 32;
private final byte[] firstBytes = new byte[1234];
private final byte[] secondBytes = new byte[4567];
private SliceBigArray sliceBigArray;

@BeforeMethod
public void setup()
{
sliceBigArray = new SliceBigArray();
sliceBigArray.ensureCapacity(CAPACITY);
}

@Test
public void testSameSliceRetainedSize()
{
// same slice should be counted only once
Slice slice = wrappedBuffer(secondBytes, 201, 1501);
for (int i = 0; i < CAPACITY; i++) {
sliceBigArray.set(i, slice);
assertEquals(sliceBigArray.sizeOf(), BIG_ARRAY_INSTANCE_SIZE + sizeOf(secondBytes) + SLICE_INSTANCE_SIZE);
}

// adding a new slice will increase the size
slice = wrappedBuffer(secondBytes, 201, 1501);
sliceBigArray.set(3, slice);
assertEquals(sliceBigArray.sizeOf(), BIG_ARRAY_INSTANCE_SIZE + sizeOf(secondBytes) + SLICE_INSTANCE_SIZE * 2);
}

@Test
public void testNullSlicesRetainedSize()
{
// add null values
sliceBigArray.set(0, null);
assertEquals(sliceBigArray.sizeOf(), BIG_ARRAY_INSTANCE_SIZE);

// replace null with a slice
sliceBigArray.set(0, wrappedBuffer(secondBytes, 201, 1501));
assertEquals(sliceBigArray.sizeOf(), BIG_ARRAY_INSTANCE_SIZE + sizeOf(secondBytes) + SLICE_INSTANCE_SIZE);

// add another slice
sliceBigArray.set(1, wrappedBuffer(secondBytes, 201, 1501));
assertEquals(sliceBigArray.sizeOf(), BIG_ARRAY_INSTANCE_SIZE + sizeOf(secondBytes) + SLICE_INSTANCE_SIZE * 2);

// replace slice with null
sliceBigArray.set(1, null);
assertEquals(sliceBigArray.sizeOf(), BIG_ARRAY_INSTANCE_SIZE + sizeOf(secondBytes) + SLICE_INSTANCE_SIZE);
}

@Test
public void testRetainedSize()
{
// add two elements
sliceBigArray.set(0, wrappedBuffer(firstBytes, 0, 100));
sliceBigArray.set(1, wrappedBuffer(secondBytes, 0, 100));
assertEquals(sliceBigArray.sizeOf(), BIG_ARRAY_INSTANCE_SIZE + sizeOf(firstBytes) + sizeOf(secondBytes) + SLICE_INSTANCE_SIZE * 2);

// add two more
sliceBigArray.set(2, wrappedBuffer(firstBytes, 100, 200));
sliceBigArray.set(3, wrappedBuffer(secondBytes, 20, 150));
assertEquals(sliceBigArray.sizeOf(), BIG_ARRAY_INSTANCE_SIZE + sizeOf(firstBytes) + sizeOf(secondBytes) + SLICE_INSTANCE_SIZE * 4);

// replace with different slices but the same base
sliceBigArray.set(2, wrappedBuffer(firstBytes, 11, 1200));
sliceBigArray.set(3, wrappedBuffer(secondBytes, 201, 1501));
assertEquals(sliceBigArray.sizeOf(), BIG_ARRAY_INSTANCE_SIZE + sizeOf(firstBytes) + sizeOf(secondBytes) + SLICE_INSTANCE_SIZE * 4);

// replace with a different slice with a different base
sliceBigArray.set(0, wrappedBuffer(secondBytes, 11, 1200));
sliceBigArray.set(2, wrappedBuffer(secondBytes, 201, 1501));
assertEquals(sliceBigArray.sizeOf(), BIG_ARRAY_INSTANCE_SIZE + sizeOf(secondBytes) + SLICE_INSTANCE_SIZE * 4);
}
}
2 changes: 1 addition & 1 deletion presto-atop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.187-tw-0.42</version>
<version>0.188-tw-0.43</version>
</parent>

<artifactId>presto-atop</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-base-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.187-tw-0.42</version>
<version>0.188-tw-0.43</version>
</parent>

<artifactId>presto-base-jdbc</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-benchmark-driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.187-tw-0.42</version>
<version>0.188-tw-0.43</version>
</parent>

<artifactId>presto-benchmark-driver</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-benchmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>presto-root</artifactId>
<groupId>com.facebook.presto</groupId>
<version>0.187-tw-0.42</version>
<version>0.188-tw-0.43</version>
</parent>

<artifactId>presto-benchmark</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected List<Driver> createDrivers(TaskContext taskContext)
ImmutableList.of(),
1_500_000,
1,
new PagesIndex.TestingFactory(),
new PagesIndex.TestingFactory(false),
false,
SingleStreamSpillerFactory.unsupportedSingleStreamSpillerFactory());
driversBuilder.add(hashBuilder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected List<Driver> createDrivers(TaskContext taskContext)
ImmutableList.of(),
1_500_000,
1,
new PagesIndex.TestingFactory(),
new PagesIndex.TestingFactory(false),
false,
SingleStreamSpillerFactory.unsupportedSingleStreamSpillerFactory());
DriverFactory hashBuildDriverFactory = new DriverFactory(0, true, true, ImmutableList.of(ordersTableScan, hashBuilder), OptionalInt.empty());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected List<Driver> createDrivers(TaskContext taskContext)
ImmutableList.of(),
1_500_000,
1,
new PagesIndex.TestingFactory(),
new PagesIndex.TestingFactory(false),
false,
SingleStreamSpillerFactory.unsupportedSingleStreamSpillerFactory());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected List<? extends OperatorFactory> createOperatorFactories()
ROWS,
ImmutableList.of(0),
ImmutableList.of(ASC_NULLS_LAST),
new PagesIndex.TestingFactory());
new PagesIndex.TestingFactory(false));

return ImmutableList.of(tableScanOperator, limitOperator, orderByOperator);
}
Expand Down
2 changes: 1 addition & 1 deletion presto-benchto-benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.187-tw-0.42</version>
<version>0.188-tw-0.43</version>
</parent>

<artifactId>presto-benchto-benchmarks</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-blackhole/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.187-tw-0.42</version>
<version>0.188-tw-0.43</version>
</parent>

<artifactId>presto-blackhole</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-bytecode/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.187-tw-0.42</version>
<version>0.188-tw-0.43</version>
</parent>

<artifactId>presto-bytecode</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-cassandra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.187-tw-0.42</version>
<version>0.188-tw-0.43</version>
</parent>

<artifactId>presto-cassandra</artifactId>
Expand Down
Loading