From dev-return-5873-archive-asf-public=cust-asf.ponee.io@metamodel.apache.org Thu Jan 25 06:18:47 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 7D580180630 for ; Thu, 25 Jan 2018 06:18:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6CF53160C4E; Thu, 25 Jan 2018 05:18:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B3BA3160C3C for ; Thu, 25 Jan 2018 06:18:46 +0100 (CET) Received: (qmail 44496 invoked by uid 500); 25 Jan 2018 05:18:45 -0000 Mailing-List: contact dev-help@metamodel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@metamodel.apache.org Delivered-To: mailing list dev@metamodel.apache.org Received: (qmail 44482 invoked by uid 99); 25 Jan 2018 05:18:45 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jan 2018 05:18:45 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1BDFAE04DB; Thu, 25 Jan 2018 05:18:45 +0000 (UTC) From: kaspersorensen To: dev@metamodel.apache.org Reply-To: dev@metamodel.apache.org References: In-Reply-To: Subject: [GitHub] metamodel pull request #177: Upgrade MetaModel dependency from 1.5.0 to 5.6.... Content-Type: text/plain Message-Id: <20180125051845.1BDFAE04DB@git1-us-west.apache.org> Date: Thu, 25 Jan 2018 05:18:45 +0000 (UTC) Github user kaspersorensen commented on a diff in the pull request: https://github.com/apache/metamodel/pull/177#discussion_r163751042 --- Diff: elasticsearch/common/src/main/java/org/apache/metamodel/elasticsearch/AbstractElasticSearchDataContext.java --- @@ -0,0 +1,149 @@ +/** + * 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. + */ +package org.apache.metamodel.elasticsearch; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.apache.metamodel.DataContext; +import org.apache.metamodel.MetaModelException; +import org.apache.metamodel.QueryPostprocessDataContext; +import org.apache.metamodel.UpdateableDataContext; +import org.apache.metamodel.elasticsearch.common.ElasticSearchUtils; +import org.apache.metamodel.schema.Column; +import org.apache.metamodel.schema.MutableColumn; +import org.apache.metamodel.schema.MutableSchema; +import org.apache.metamodel.schema.MutableTable; +import org.apache.metamodel.schema.Schema; +import org.apache.metamodel.util.SimpleTableDef; +import org.elasticsearch.common.unit.TimeValue; + +public abstract class AbstractElasticSearchDataContext extends QueryPostprocessDataContext implements DataContext, + UpdateableDataContext { + + public static final TimeValue TIMEOUT_SCROLL = TimeValue.timeValueSeconds(60); + + protected final Object elasticSearchClient; --- End diff -- There doesn't seem to be any reason to keep this in the abstract class any more, since the `Object` type removes any kind of possibility of reusing it. It's used differently in the two subtypes, so I suggest they each just have a field for the client object with a type that they need. ---