31
31
32
32
import java .io .IOException ;
33
33
34
- import static com .logicalclocks .hsfs .metadata .HopsworksClient .PROJECT_PATH ;
35
- import static com .logicalclocks .hsfs .metadata .HopsworksClient .getInstance ;
36
-
37
34
public class StatisticsApi {
38
35
39
36
private static final String ENTITY_ROOT_PATH = "{/entityType}" ;
@@ -65,7 +62,7 @@ public Statistics post(TrainingDatasetBase trainingDatasetBase, Statistics stati
65
62
66
63
private Statistics post (Integer projectId , Integer featurestoreId , Integer entityId , Statistics statistics )
67
64
throws FeatureStoreException , IOException {
68
- String pathTemplate = PROJECT_PATH + FeatureStoreApi .FEATURE_STORE_PATH + STATISTICS_PATH ;
65
+ String pathTemplate = HopsworksClient . PROJECT_PATH + FeatureStoreApi .FEATURE_STORE_PATH + STATISTICS_PATH ;
69
66
70
67
String uri = UriTemplate .fromTemplate (pathTemplate )
71
68
.set ("projectId" , projectId )
@@ -79,7 +76,7 @@ private Statistics post(Integer projectId, Integer featurestoreId, Integer entit
79
76
public Statistics post (FeatureViewBase featureViewBase ,
80
77
Integer trainingDataVersion , Statistics statistics )
81
78
throws FeatureStoreException , IOException {
82
- String pathTemplate = PROJECT_PATH + FeatureStoreApi .FEATURE_STORE_PATH + FV_STATISTICS_PATH ;
79
+ String pathTemplate = HopsworksClient . PROJECT_PATH + FeatureStoreApi .FEATURE_STORE_PATH + FV_STATISTICS_PATH ;
83
80
84
81
String uri = UriTemplate .fromTemplate (pathTemplate )
85
82
.set ("projectId" , featureViewBase .getFeatureStore ().getProjectId ())
@@ -92,7 +89,7 @@ public Statistics post(FeatureViewBase featureViewBase,
92
89
}
93
90
94
91
private Statistics post (String uri , Statistics statistics ) throws FeatureStoreException , IOException {
95
- HopsworksClient hopsworksClient = getInstance ();
92
+ HopsworksClient hopsworksClient = HopsworksClient . getInstance ();
96
93
LOGGER .info ("Sending metadata request: " + uri );
97
94
HttpPost postRequest = new HttpPost (uri );
98
95
postRequest .setEntity (hopsworksClient .buildStringEntity (statistics ));
@@ -114,7 +111,7 @@ public Statistics get(TrainingDatasetBase trainingDatasetBase, String commitTime
114
111
private Statistics get (Integer projectId , Integer featurestoreId , Integer entityId , String commitTime )
115
112
throws FeatureStoreException , IOException {
116
113
HopsworksClient hopsworksClient = HopsworksClient .getInstance ();
117
- String pathTemplate = PROJECT_PATH
114
+ String pathTemplate = HopsworksClient . PROJECT_PATH
118
115
+ FeatureStoreApi .FEATURE_STORE_PATH
119
116
+ STATISTICS_PATH ;
120
117
@@ -152,7 +149,7 @@ public Statistics getLast(TrainingDatasetBase trainingDatasetBase) throws Featur
152
149
private Statistics getLast (Integer projectId , Integer featurestoreId , Integer entityId )
153
150
throws FeatureStoreException , IOException {
154
151
HopsworksClient hopsworksClient = HopsworksClient .getInstance ();
155
- String pathTemplate = PROJECT_PATH
152
+ String pathTemplate = HopsworksClient . PROJECT_PATH
156
153
+ FeatureStoreApi .FEATURE_STORE_PATH
157
154
+ STATISTICS_PATH ;
158
155
0 commit comments