NealSun96 commented on a change in pull request #788: Implement request 
forwarding for ZkRoutingDataWriter
URL: https://github.com/apache/helix/pull/788#discussion_r384702271
 
 

 ##########
 File path: 
helix-rest/src/main/java/org/apache/helix/rest/server/resources/mock/MockMetadataStoreDirectoryAccessor.java
 ##########
 @@ -0,0 +1,118 @@
+package org.apache.helix.rest.server.resources.mock;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import javax.ws.rs.Path;
+
+import org.apache.helix.msdcommon.datamodel.TrieRoutingData;
+import org.apache.helix.msdcommon.exception.InvalidRoutingDataException;
+import org.apache.helix.rest.metadatastore.MetadataStoreDirectory;
+import org.apache.helix.rest.metadatastore.ZkMetadataStoreDirectory;
+import 
org.apache.helix.rest.metadatastore.accessor.MetadataStoreRoutingDataReader;
+import 
org.apache.helix.rest.metadatastore.accessor.MetadataStoreRoutingDataWriter;
+import org.apache.helix.rest.metadatastore.accessor.ZkRoutingDataReader;
+import org.apache.helix.rest.metadatastore.accessor.ZkRoutingDataWriter;
+import 
org.apache.helix.rest.server.resources.metadatastore.MetadataStoreDirectoryAccessor;
+
+
+/**
+ * An accessor that mocks the MetadataStoreDirectoryAccessor for testing 
purpose.
+ */
 
 Review comment:
   This might not be true. On Monday we assumed that Jersey isn't able to 
recognize it in the test package, and we moved this file into the same package 
as `MetadataStoreDirectoryAccessor` for it to work, hence our conclusion. 
However, on Tuesday, after moving it to its own package (not in the test 
package, but its own package), it was not working either. 
   After research, I realized that its package path was not correctly added. On 
Monday, this file is in the same package as `MetadataStoreDirectoryAccessor`, 
and it was working because the package for `MetadataStoreDirectoryAccessor` was 
added already. There were some major changes to `MockHelixRestServer` for it to 
work in this current package. Therefore, the conclusion on Monday is not true 
anymore - the reason it wasn't working might not be due to the test package. 
   Regardless, I think it's fine to leave this file here. However, if you 
believe this file is better in the test package, I can experiment with that and 
verify our conclusion. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to