Skip to content

Commit 2b592dc

Browse files
beinanzacw7
authored andcommitted
Upgrade Alluxio to 307
1 parent 32f213b commit 2b592dc

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<dep.nexus-staging-plugin.version>1.6.8</dep.nexus-staging-plugin.version>
6565
<dep.asm.version>9.0</dep.asm.version>
6666
<dep.gcs.version>1.9.17</dep.gcs.version>
67-
<dep.alluxio.version>2.8.1</dep.alluxio.version>
67+
<dep.alluxio.version>307</dep.alluxio.version>
6868
<dep.slf4j.version>1.7.32</dep.slf4j.version>
6969
<dep.kafka.version>2.3.1</dep.kafka.version>
7070
<dep.pinot.version>0.11.0</dep.pinot.version>

presto-cache/src/main/java/com/facebook/presto/cache/alluxio/PrestoCacheContext.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
import com.facebook.presto.hive.HiveFileContext;
2020
import com.google.common.collect.ImmutableMap;
2121

22+
import static com.facebook.presto.common.RuntimeUnit.BYTE;
23+
import static com.facebook.presto.common.RuntimeUnit.NANO;
2224
import static com.facebook.presto.common.RuntimeUnit.NONE;
2325
import static java.util.Objects.requireNonNull;
2426

@@ -49,9 +51,18 @@ private PrestoCacheContext(HiveFileContext hiveFileContext)
4951
}
5052

5153
@Override
52-
public void incrementCounter(String name, long value)
54+
public void incrementCounter(String name, StatsUnit unit, long value)
5355
{
54-
hiveFileContext.incrementCounter(name, NONE, value);
56+
switch (unit) {
57+
case BYTE:
58+
hiveFileContext.incrementCounter(name, BYTE, value);
59+
break;
60+
case NANO:
61+
hiveFileContext.incrementCounter(name, NANO, value);
62+
break;
63+
default:
64+
hiveFileContext.incrementCounter(name, NONE, value);
65+
}
5566
}
5667

5768
public HiveFileContext getHiveFileContext()

0 commit comments

Comments
 (0)