ISG-ICS / cloudberry

Big Data Visualization
http://cloudberry.ics.uci.edu
90 stars 82 forks source link

AsterixDB scripts need to be updated #676

Closed luochen01 closed 4 years ago

luochen01 commented 5 years ago

AsterixDB recently introduced a patch https://asterix-gerrit.ics.uci.edu/#/c/3267/ that no longer supports using the request body as statement. Instead, a parameter called "statement" must be provided to define a set of queries to be executed. As a results, many scripts used by Cloudberry will not work and must be fixed when upgrading AsterixDB.

The following changes can be used to fix the scripts:

  1. removes -XPOST (as POST is implicit for curl's --data options)
  2. uses URL encoding instead of binary encoding for the content, and
  3. provides the parameter name statement on the curl command line instead if providing it in the body.

An example is as follows:

cat <<EOF | curl --data-urlencode statement@- http://localhost:19002/query/service 
drop dataverse twitter if exists;
create dataverse twitter if not exists;
use twitter;
...
EOF

Reference: https://issues.apache.org/jira/browse/ASTERIXDB-2543

baiqiushi commented 4 years ago

771