File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
lib/trino-filesystem-cache-alluxio
src/main/java/io/trino/filesystem/alluxio
testing/trino-product-tests/src/main/java/io/trino/tests/product/utils Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 6363 <artifactId >trino-filesystem</artifactId >
6464 </dependency >
6565
66+ <dependency >
67+ <groupId >io.trino</groupId >
68+ <artifactId >trino-spi</artifactId >
69+ </dependency >
70+
6671 <dependency >
6772 <groupId >jakarta.annotation</groupId >
6873 <artifactId >jakarta.annotation-api</artifactId >
112117 <scope >runtime</scope >
113118 </dependency >
114119
115- <dependency >
116- <groupId >io.trino</groupId >
117- <artifactId >trino-spi</artifactId >
118- <scope >runtime</scope >
119- </dependency >
120-
121120 <dependency >
122121 <groupId >io.airlift</groupId >
123122 <artifactId >junit-extensions</artifactId >
Original file line number Diff line number Diff line change 1616import alluxio .metrics .MetricsConfig ;
1717import alluxio .metrics .MetricsSystem ;
1818import com .google .inject .Binder ;
19+ import com .google .inject .Provider ;
1920import io .airlift .configuration .AbstractConfigurationAwareModule ;
2021import io .trino .filesystem .cache .CachingHostAddressProvider ;
2122import io .trino .filesystem .cache .ConsistentHashingHostAddressProvider ;
2223import io .trino .filesystem .cache .ConsistentHashingHostAddressProviderConfig ;
2324import io .trino .filesystem .cache .TrinoFileSystemCache ;
25+ import io .trino .spi .catalog .CatalogName ;
2426
2527import java .util .Properties ;
2628
@@ -45,7 +47,9 @@ protected void setup(Binder binder)
4547 configBinder (binder ).bindConfig (AlluxioFileSystemCacheConfig .class );
4648 configBinder (binder ).bindConfig (ConsistentHashingHostAddressProviderConfig .class );
4749 binder .bind (AlluxioCacheStats .class ).in (SINGLETON );
48- newExporter (binder ).export (AlluxioCacheStats .class ).as (generator -> generator .generatedNameOf (AlluxioCacheStats .class ));
50+ Provider <CatalogName > catalogName = binder .getProvider (CatalogName .class );
51+ newExporter (binder ).export (AlluxioCacheStats .class )
52+ .as (generator -> generator .generatedNameOf (AlluxioCacheStats .class , catalogName .get ().toString ()));
4953
5054 if (isCoordinator ) {
5155 newOptionalBinder (binder , CachingHostAddressProvider .class ).setBinding ().to (ConsistentHashingHostAddressProvider .class ).in (SINGLETON );
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public static CacheStats getCacheStats(String catalog)
2727 QueryResult queryResult = onTrino ().executeQuery ("SELECT " +
2828 " sum(\" cachereads.alltime.count\" ) as cachereads, " +
2929 " sum(\" externalreads.alltime.count\" ) as externalreads " +
30- "FROM jmx.current.\" io.trino.filesystem.alluxio:name=" + catalog + ",type=alluxiocachestats\" ;" );
30+ "FROM jmx.current.\" io.trino.filesystem.alluxio:catalog=" + catalog + ", name=" + catalog + ",type=alluxiocachestats\" ;" );
3131
3232 double cacheReads = (Double ) getOnlyElement (queryResult .rows ())
3333 .get (queryResult .tryFindColumnIndex ("cachereads" ).get () - 1 );
You can’t perform that action at this time.
0 commit comments