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 3FA0E180630 for ; Tue, 2 Jan 2018 18:53:52 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2FA71160C09; Tue, 2 Jan 2018 17:53:52 +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 F2518160C26 for ; Tue, 2 Jan 2018 18:53:50 +0100 (CET) Received: (qmail 16963 invoked by uid 500); 2 Jan 2018 17:53:50 -0000 Mailing-List: contact user-help@predictionio.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@predictionio.apache.org Delivered-To: mailing list user@predictionio.apache.org Received: (qmail 16953 invoked by uid 99); 2 Jan 2018 17:53:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2018 17:53:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 97976180705 for ; Tue, 2 Jan 2018 17:53:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.01 X-Spam-Level: ** X-Spam-Status: No, score=2.01 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, T_REMOTE_IMAGE=0.01, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=occamsmachete-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id H08XRiW9cXe6 for ; Tue, 2 Jan 2018 17:53:48 +0000 (UTC) Received: from mail-pg0-f48.google.com (mail-pg0-f48.google.com [74.125.83.48]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 295E95F666 for ; Tue, 2 Jan 2018 17:53:47 +0000 (UTC) Received: by mail-pg0-f48.google.com with SMTP id r2so9174803pgq.13 for ; Tue, 02 Jan 2018 09:53:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=occamsmachete-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=kLDDdsfUIREupHArS3gbXoRBedx9DVOx8C4Oe0++kNo=; b=cM8w/MJS/E9/0aRu/nan6uFwXCbszaG92qxebgLxA24I4QEL5jhX5cRqR9fHNTQZyf DtM5af1vMWSuO6phv5GRog7IYb1EZJwMPRta/ldbAH5qdoClHIh+DRD79ZFKqCS0cDya x9rG7h7aOIrqFoZelBv6DcM5Qober5Io2CceeLuSEWM1nXfLZYneToJIbqIQDeHwBZe3 2xzzefNHlKVpA4aTxyZ+fZ2k+FQMxKisqvOvSgFYMaR+ReN/ny9FeZZYevU7qR5Kosgy /JN52UVZ5SrINQ+YMLvI/BYEkw9t1lQRQdWudDcU6gB6t3Hd/4cvmFWsjgG0iYSK5DXO QbbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=kLDDdsfUIREupHArS3gbXoRBedx9DVOx8C4Oe0++kNo=; b=tPqdXCZVBb0/XHC9YqkVkLf8RBKgcdWMuX1whdQnqMRZeOKAjJCVgodstrfswfjwKN +SPMYEnHOeIU/UuRbzCuJOzj50cWCEJGBDNAsjAhXo9KcJJjuNPYDY9zoEZS3ArnUq/L qyMHfFb22Q/Cjms5o/mbegFsTtBfMvIsHUN/ruuGGk44lN0crYXwl8A9wM85F4pz7Zne T0TAn6fiVvDS+SoD37OcXUq2pwHGPTN54uLC+rYqnDVVXX3aFkBwBdlpH6kqRB5MlAc8 6VvZkcGK5Srw9MWoXS9dOD0DgJ0AParwlIXAJ7YtafxawLFmaqlFXBxGUZ42+wignV2g mHyg== X-Gm-Message-State: AKGB3mIUGFXQnAeV5zzXp0XPEH2W2k31ERdCS+ziDxFfgoMLYcKbCFT0 3Qnc91nJG8fzMp5+oER6Hc/CErmtzFs= X-Google-Smtp-Source: ACJfBouu12eK9ZFLAKEhPXaRZ4pWDj4XpkAkVizLpvtJd65YVUMag7i00spn7gwxL532GldZWQESbg== X-Received: by 10.101.100.24 with SMTP id a24mr40324559pgv.185.1514915625168; Tue, 02 Jan 2018 09:53:45 -0800 (PST) Received: from [192.168.0.10] (c-24-18-213-211.hsd1.wa.comcast.net. [24.18.213.211]) by smtp.gmail.com with ESMTPSA id o63sm88627257pfg.101.2018.01.02.09.53.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 09:53:44 -0800 (PST) From: Pat Ferrel Message-Id: <5489C872-F472-4989-B99C-2E56817FE48D@occamsmachete.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_E3A93758-D8C5-4AAC-AF0E-4175149BCA19" Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: App still returns results after pio app data-delete Date: Tue, 2 Jan 2018 09:53:42 -0800 In-Reply-To: Cc: user@predictionio.incubator.apache.org To: user@predictionio.apache.org References: X-Mailer: Apple Mail (2.3445.5.20) archived-at: Tue, 02 Jan 2018 17:53:52 -0000 --Apple-Mail=_E3A93758-D8C5-4AAC-AF0E-4175149BCA19 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Have a look at the ES docs on their site. There are several ways, from = sending a JSON command to deleting the data directory depending on how = clean you want ES to be. In general my opinion is that PIO is an integration framework for = several services and for the majority of applications you will not need = to deal directly with the services except for setup. This may be an = exception. In all cases you may find it best to seek guidance from the = support communities or docs of those services. If you are sending a REST JSON command directive it would be as shown = here: = https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-delete= -index.html = $ curl -XDELETE 'http://localhost:9200//' The Index name is named in the UR engine.json or in pio-env depending on = which index you want to delete. On Jan 2, 2018, at 12:22 AM, Noelia Os=C3=A9s Fern=C3=A1ndez = wrote: Thanks for the explanation! How do I delete the ES index? is it just DELETE /my_index_name? Happy New Year! On 22 December 2017 at 19:42, Pat Ferrel > wrote: With PIO the model is managed by the user, not PIO. The input is = separate and can be deleted without affecting the model. Each Engine handles model=E2=80=99s it=E2=80=99s own way but most use = the model storage in pio-env. So deleting those will get rid of the = model. The UR keeps the model in ES under the =E2=80=9CindexName=E2=80=9D = and =E2=80=9CtypeName=E2=80=9D in engine.json. So you need to delete the = index if you want to stop queries from working. The UR maintain=E2=80=99s = one live copy of the model and removes old ones after a new one is made = live so there will only ever be one model (unless you have changed your = indexName often) On Dec 21, 2017, at 4:58 AM, Noelia Os=C3=A9s Fern=C3=A1ndez = > wrote: Hi all! I have executed a pio app data-delete MyApp. The command has outputted = the following: [INFO] [HBLEvents] Removing table pio_event:events_4... [INFO] [App$] Removed Event Store for the app ID: 4 [INFO] [HBLEvents] The table pio_event:events_4 doesn't exist yet. = Creating now... [INFO] [App$] Initialized Event Store for the app ID: 4 However, I executed curl -H "Content-Type: application/json" -d ' { }' http://localhost:8000/queries.json = after deleting the data and I still get the same results as before = deleting the data. Why is this happening? I expected to get either an error message or an empty result like = {"itemScores":[]}. Any help is much appreciated. Best regards, Noelia --=20 Noelia Os=C3=A9s Fern=C3=A1ndez, PhD Senior Researcher | Investigadora Senior noses@vicomtech.org +[34] 943 30 92 30 Data Intelligence for Energy and Industrial Processes | Inteligencia de = Datos para Energ=C3=ADa y Procesos Industriales = = member of: Legal Notice - Privacy policy = --Apple-Mail=_E3A93758-D8C5-4AAC-AF0E-4175149BCA19 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Have = a look at the ES docs on their site. There are several ways, from = sending a JSON command to deleting the data directory depending on how = clean you want ES to be.

In general my opinion is that PIO is an integration framework = for several services and for the majority of applications you will not = need to deal directly with the services except for setup. This may be an = exception. In all cases you may find it best to seek guidance from the = support communities or docs of those services.

If you are sending a REST JSON command = directive it would be as shown here: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/ind= ices-delete-index.html

The Index name is named in the UR = engine.json or in pio-env depending on which index you want to = delete.


On Jan 2, 2018, at 12:22 AM, Noelia Os=C3=A9s Fern=C3=A1ndez = <noses@vicomtech.org> wrote:

Thanks for the = explanation!

How do I delete the ES = index? is it just DELETE /my_index_name?

Happy New Year!

On 22 = December 2017 at 19:42, Pat Ferrel <pat@occamsmachete.com> wrote:
With PIO the model is managed by the user, not PIO. The input = is separate and can be deleted without affecting the model.

Each Engine handles = model=E2=80=99s it=E2=80=99s own way but most use the model storage in = pio-env. So deleting those will get rid of the model. The UR keeps the = model in ES under the =E2=80=9CindexName=E2=80=9D and =E2=80=9CtypeName=E2= =80=9D in engine.json. So you need to delete the index if you want to = stop queries from working. The UR maintain=E2=80=99s one live copy of = the model and removes old ones after a new one is made live so there = will only ever be one model (unless you have changed your indexName = often)

On Dec 21, 2017, at 4:58 AM, Noelia Os=C3=A9s = Fern=C3=A1ndez <noses@vicomtech.org> wrote:

Hi all!

I = have executed a pio app data-delete MyApp. The command has outputted the = following:

[INFO] [HBLEvents] Removing = table pio_event:events_4...
[INFO] [App$] Removed Event = Store for the app ID: 4
[INFO] [HBLEvents] The table = pio_event:events_4 doesn't exist yet. Creating now...
[INFO]= [App$] Initialized Event Store for the app ID: 4


However, I executed

curl -H "Content-Type: application/json" -d '
{
}' http://localhost:8000/queries.json

after deleting the data and I still get = the same results as before deleting the data. Why is this happening?

I expected to get either an error = message or an empty result like {"itemScores":[]}.

Any help is much appreciated.
Best = regards,
Noelia




--

Noelia Os=C3=A9s Fern=C3=A1ndez, = PhD
Senior Researcher | = Investigadora Senior

noses@vicomtech.org
+[34] 943 30 92 30
Data Intelligence for Energy and Industrial Processes | = Inteligencia de Datos para Energ=C3=ADa y Procesos = Industriales

  

member of: 

Legal Notice - Privacy = policy

= --Apple-Mail=_E3A93758-D8C5-4AAC-AF0E-4175149BCA19--