[ https://issues.apache.org/jira/browse/SDAP-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16393097#comment-16393097 ]
ASF GitHub Bot commented on SDAP-35: ------------------------------------ lewismc commented on a change in pull request #7: SDAP-35 Overhaul MUDROD configuration URL: https://github.com/apache/incubator-sdap-mudrod/pull/7#discussion_r173494015 ########## File path: core/src/main/java/org/apache/sdap/mudrod/recommendation/pre/NormalizeFeatures.java ########## @@ -0,0 +1,110 @@ +/* + * 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. + */ +/** + * This package includes the preprocessing, processing, and data structure used + * by recommendation module. + */ +package org.apache.sdap.mudrod.recommendation.pre; + +import org.apache.sdap.mudrod.discoveryengine.DiscoveryStepAbstract; +import org.apache.sdap.mudrod.driver.ESDriver; +import org.apache.sdap.mudrod.driver.SparkDriver; +import org.apache.sdap.mudrod.main.MudrodConstants; +import org.apache.sdap.mudrod.recommendation.structure.MetadataFeature; +import org.apache.sdap.mudrod.recommendation.structure.PODAACMetadataFeature; + +import org.elasticsearch.action.search.SearchResponse; +import org.elasticsearch.action.update.UpdateRequest; +import org.elasticsearch.common.unit.TimeValue; +import org.elasticsearch.index.query.QueryBuilders; +import org.elasticsearch.search.SearchHit; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.regex.Pattern; + +public class NormalizeFeatures extends DiscoveryStepAbstract { + + /** + * + */ + private static final long serialVersionUID = 1L; + private static final Logger LOG = LoggerFactory.getLogger(NormalizeFeatures.class); + // index name + private String indexName; + // type name of metadata in ES + private String metadataType; + + /** + * Creates a new instance of OHEncoder. + * + * @param props the Mudrod configuration + * @param es an instantiated {@link ESDriver} + * @param spark an instantiated {@link SparkDriver} + */ + public NormalizeFeatures(Properties props, ESDriver es, SparkDriver spark) { + super(props, es, spark); + indexName = props.getProperty(MudrodConstants.ES_INDEX_NAME); + metadataType = MudrodConstants.RECOM_METADATA_TYPE; + } + + @Override + public Object execute() { + LOG.info("*****************proprocessing metadata feature starts******************"); Review comment: This logging is very messy. If I were you I would remove it from as many instance of the codebase as you can. It makes logs very convoluted and also makes some types of log analysis difficult should we wish to do that in the future. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Overhaul MUDROD configuration > ----------------------------- > > Key: SDAP-35 > URL: https://issues.apache.org/jira/browse/SDAP-35 > Project: Apache Science Data Analytics Platform > Issue Type: Task > Components: mudrod > Reporter: Lewis John McGibbney > Priority: Major > > [~Yongyao] please augment the description here with your intended patch as > per https://github.com/aist-oceanworks/mudrod/pull/215 > Also, please name your branch and commit message after the issue you create > in JIRA. It makes things much easier as we try to improve the quality of our > source code review and development workflow. Thank you -- This message was sent by Atlassian JIRA (v7.6.3#76005)