Skip to content

Commit

Permalink
ADBDEV-6920: Changes related to renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
RomaZe committed Dec 25, 2024
1 parent 866228c commit 28dffdc
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 14 deletions.
8 changes: 5 additions & 3 deletions automation/arenadata/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,16 @@ RUN mkdir -p /data1/master /data1/primary /data1/mirror && chmod -R 755 /data1 &
chown -R gpadmin:gpadmin /home/gpadmin && \
install_gpdb

# Create symlinks if needed
RUN if [ -d /usr/local/greengage-db-devel ]; then ln -s /usr/local/greengage-db-devel /usr/local/greenplum-db-devel; fi;
RUN if [ -e /usr/local/greengage-db-devel/greengage_path.sh ]; then ln -s /usr/local/greengage-db-devel/greengage_path.sh /usr/local/greenplum-db-devel/greenplum_path.sh; fi;

# Install PXF
ENV JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
COPY . /home/gpadmin/pxf_src
COPY ./automation/arenadata/scripts/compile_pxf_without_test.sh ./pxf_src/concourse/scripts/compile_pxf_without_test.sh
RUN chmod +x ./pxf_src/concourse/scripts/compile_pxf_without_test.sh
RUN source gpdb_src/concourse/scripts/common.bash && \
mkdir pxf_tarball && \
install_gpdb && \
source '/usr/local/greenplum-db-devel/greenplum_path.sh' && \
export SKIP_FDW_BUILD_REASON=0 && \
pxf_src/concourse/scripts/compile_pxf_without_test.sh && \
Expand Down Expand Up @@ -106,5 +108,5 @@ RUN set -eux; \
RUN cp /tmp/libs/* ${PXF_HOME}/lib/

RUN chmod a+x ./pxf_src/automation/arenadata/scripts/start_adb_cluster.sh
RUN chown -R gpadmin:gpadmin /usr/local/greenplum-db-devel
RUN if [ -d /usr/local/greengage-db-devel ]; then chown -R gpadmin:gpadmin /usr/local/greengage-db-devel; else chown -R gpadmin:gpadmin /usr/local/greenplum-db-devel; fi;
ENTRYPOINT ["/home/gpadmin/pxf_src/automation/arenadata/scripts/start_adb_cluster.sh"]
2 changes: 1 addition & 1 deletion automation/arenadata/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ services:
retries: 3

oracle:
image: "absolutapps/oracle-12c-ee"
image: "haoyu233/oracle-12c-ee"
restart: unless-stopped
container_name: oracle
hostname: oracle
Expand Down
6 changes: 5 additions & 1 deletion automation/arenadata/scripts/compile_pxf_without_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

set -eoux pipefail

GPHOME=/usr/local/greenplum-db-devel
if [ -d /usr/local/greengage-db-devel ]; then
GPHOME=/usr/local/greengage-db-devel
else
GPHOME=/usr/local/greenplum-db-devel
fi

# use a login shell for setting environment
bash --login -c "
Expand Down
8 changes: 6 additions & 2 deletions automation/arenadata/scripts/start_adb_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,12 @@ if [ "$HOSTNAME" == "$DOCKER_GP_MASTER_SERVER" ]; then
echo 'local all testuser trust' >> /data1/master/gpseg-1/pg_hba.conf &&
echo 'host all gpadmin 0.0.0.0/0 trust' >> /data1/master/gpseg-1/pg_hba.conf &&
echo 'host all all 0.0.0.0/0 md5' >> /data1/master/gpseg-1/pg_hba.conf &&
gpconfig -c gp_resource_manager -v group &&
gpstop -aM fast && gpstart -a"
gpconfig -c gp_resource_manager -v group"

echo "*******************"
echo "Restart ADB cluster"
echo "*******************"
sudo -H -u gpadmin bash -c -l "gpstop -aM fast && gpstart -a"

# Check cluster
echo "-------------------------------------"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
-- start_ignore
-- end_ignore
-- @description query01 for PXF test to check that the session is closed correctly

-- start_matchsubs
--
-- m/.*File '\/usr\/local\/.*\/pxf\/servers\/named\/wrong_file_name.sql.*/
-- s/.*File '\/usr\/local\/.*\/pxf\/servers\/named\/wrong_file_name.sql.*/ERROR: PXF server error : Failed to read text of query wrong_file_name : File '\/usr\/local\/greenplum-db-devel\/pxf\/servers\/named\/wrong_file_name.sql' does not exist/
--
-- end_matchsubs

SELECT * FROM named_query_read_ext_table ORDER BY id;
id | name
----+-------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
-- @description query01 for PXF test to check that the session is closed correctly

-- start_matchsubs
--
-- m/.*File '\/usr\/local\/.*\/pxf\/servers\/named\/wrong_file_name.sql.*/
-- s/.*File '\/usr\/local\/.*\/pxf\/servers\/named\/wrong_file_name.sql.*/ERROR: PXF server error : Failed to read text of query wrong_file_name : File '\/usr\/local\/greenplum-db-devel\/pxf\/servers\/named\/wrong_file_name.sql' does not exist/
--
-- end_matchsubs

SELECT * FROM named_query_read_ext_table ORDER BY id;

SELECT * FROM named_query_wrong_read_ext_table ORDER BY id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public class Gpdb extends DbSystemObject {

private static final String DEFAULT_PORT = "5432";
private static final String GREENPLUM_DATABASE_PREFIX = "Greenplum Database ";
private static final String GREENPLUM_DATABASE_PREFIX = "Database ";
private static final String IF_NOT_EXISTS_OPTION = "IF NOT EXISTS";

private String sshUserName;
Expand Down
4 changes: 0 additions & 4 deletions server/pxf-service/src/scripts/pxf
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,6 @@ function installExtensions() {
if [[ -d ${parent_script_dir}/gpextable ]]; then
if [[ -z "${GPHOME}" ]]; then
echoYellow 'WARNING: environment variable GPHOME is not set, skipping install of Greenplum External Table PXF Extension'
elif [[ ! -f ${GPHOME}/greenplum_path.sh ]]; then
echoYellow "WARNING: environment variable GPHOME (${GPHOME}) must be set to a valid Greenplum installation, skipping install of Greenplum External Table PXF Extension'"
else
echoGreen "Installing Greenplum External Table PXF Extension into '${GPHOME}'"

Expand All @@ -267,8 +265,6 @@ function installExtensions() {
if [[ -d ${parent_script_dir}/fdw ]]; then
if [[ -z "${GPHOME}" ]]; then
echoYellow 'WARNING: environment variable GPHOME is not set, skipping install of Greenplum Foreign Data Wrapper PXF Extension'
elif [[ ! -f ${GPHOME}/greenplum_path.sh ]]; then
echoYellow "WARNING: environment variable GPHOME (${GPHOME}) must be set to a valid Greenplum installation, skipping install of Greenplum Foreign Data Wrapper PXF Extension'"
else
echoGreen "Installing Greenplum Foreign Data Wrapper PXF Extension into '${GPHOME}'"

Expand Down

0 comments on commit 28dffdc

Please sign in to comment.