Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
bc72cb6b
Commit
bc72cb6b
authored
Jun 28, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated mysql-test/ndb to make use of new default config options
parent
e2d3f7b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
87 deletions
+33
-87
mysql-test/ndb/ndb_config_2_node.ini
mysql-test/ndb/ndb_config_2_node.ini
+5
-46
mysql-test/ndb/ndbcluster.sh
mysql-test/ndb/ndbcluster.sh
+28
-41
No files found.
mysql-test/ndb/ndb_config_2_node.ini
View file @
bc72cb6b
...
@@ -7,71 +7,30 @@ Discless: CHOOSE_Discless
...
@@ -7,71 +7,30 @@ Discless: CHOOSE_Discless
[COMPUTER]
[COMPUTER]
Id:
1
Id:
1
ByteOrder:
Little
HostName:
CHOOSE_HOSTNAME_1
HostName:
CHOOSE_HOSTNAME_1
[COMPUTER]
[COMPUTER]
Id:
2
Id:
2
ByteOrder:
Little
HostName:
CHOOSE_HOSTNAME_2
HostName:
CHOOSE_HOSTNAME_2
[COMPUTER]
[DB]
Id:
3
ByteOrder:
Little
HostName:
CHOOSE_HOSTNAME_3
[COMPUTER]
Id:
4
ByteOrder:
Little
HostName:
CHOOSE_HOSTNAME_4
[COMPUTER]
Id:
5
ByteOrder:
Little
HostName:
CHOOSE_HOSTNAME_5
[COMPUTER]
Id:
6
ByteOrder:
Little
HostName:
CHOOSE_HOSTNAME_6
[COMPUTER]
Id:
7
ByteOrder:
Little
HostName:
CHOOSE_HOSTNAME_7
[MGM]
Id:
1
ExecuteOnComputer:
1
ExecuteOnComputer:
1
PortNumber:
CHOOSE_PORT_BASE00
FileSystemPath:
CHOOSE_FILESYSTEM_NODE_1
PortNumberStats:
CHOOSE_PORT_BASE01
[DB]
[DB]
Id:
2
ExecuteOnComputer:
2
ExecuteOnComputer:
2
FileSystemPath:
CHOOSE_FILESYSTEM_NODE_2
FileSystemPath:
CHOOSE_FILESYSTEM_NODE_2
[DB]
[MGM]
Id:
3
PortNumber:
CHOOSE_PORT_MGM
ExecuteOnComputer:
3
FileSystemPath:
CHOOSE_FILESYSTEM_NODE_3
[API]
[API]
Id:
11
ExecuteOnComputer:
4
[API]
[API]
Id:
12
ExecuteOnComputer:
5
[API]
[API]
Id:
13
ExecuteOnComputer:
6
[API]
[API]
Id:
14
ExecuteOnComputer:
7
[TCP DEFAULT]
[TCP DEFAULT]
PortNumber:
CHOOSE_PORT_
BASE02
PortNumber:
CHOOSE_PORT_
TRANSPORTER
mysql-test/ndb/ndbcluster.sh
View file @
bc72cb6b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
# This scripts starts the table handler ndbcluster
# This scripts starts the table handler ndbcluster
# configurable parameters, make sure to change in mysqlcluterd as well
# configurable parameters, make sure to change in mysqlcluterd as well
port_base
=
"22
"
# using ports port_base{"00","01", etc}
port_base
=
"22
00"
fsdir
=
`
pwd
`
fsdir
=
`
pwd
`
# end configurable parameters
# end configurable parameters
...
@@ -82,11 +82,8 @@ while test $# -gt 0; do
...
@@ -82,11 +82,8 @@ while test $# -gt 0; do
done
done
fs_ndb
=
$fsdir
/ndbcluster
fs_ndb
=
$fsdir
/ndbcluster
fs_mgm_1
=
$fs_ndb
/1.ndb_mgm
fs_name_1
=
$fs_ndb
/node-1-fs-
$port_base
fs_ndb_2
=
$fs_ndb
/2.ndb_db
fs_name_2
=
$fs_ndb
/node-2-fs-
$port_base
fs_ndb_3
=
$fs_ndb
/3.ndb_db
fs_name_2
=
$fs_ndb
/node-2-fs
fs_name_3
=
$fs_ndb
/node-3-fs
NDB_HOME
=
NDB_HOME
=
export
NDB_CONNECTSTRING
export
NDB_CONNECTSTRING
...
@@ -111,13 +108,10 @@ NDB_CONNECTSTRING=
...
@@ -111,13 +108,10 @@ NDB_CONNECTSTRING=
if
[
$initial_ndb
]
;
then
if
[
$initial_ndb
]
;
then
[
-d
$fs_ndb
]
||
mkdir
$fs_ndb
[
-d
$fs_ndb
]
||
mkdir
$fs_ndb
[
-d
$fs_mgm_1
]
||
mkdir
$fs_mgm_1
[
-d
$fs_name_1
]
||
mkdir
$fs_name_1
[
-d
$fs_ndb_2
]
||
mkdir
$fs_ndb_2
[
-d
$fs_ndb_3
]
||
mkdir
$fs_ndb_3
[
-d
$fs_name_2
]
||
mkdir
$fs_name_2
[
-d
$fs_name_2
]
||
mkdir
$fs_name_2
[
-d
$fs_name_3
]
||
mkdir
$fs_name_3
fi
fi
if
[
-d
"
$fs_ndb
"
-a
-d
"
$fs_
mgm_1
"
-a
-d
"
$fs_ndb_2
"
-a
-d
"
$fs_ndb_3
"
-a
-d
"
$fs_name_2
"
-a
-d
"
$fs_name_3
"
]
;
then
:
;
else
if
[
-d
"
$fs_ndb
"
-a
-d
"
$fs_
name_1
"
-a
-d
"
$fs_name_2
"
]
;
then
:
;
else
echo
"
$fs_ndb
filesystem directory does not exist"
echo
"
$fs_ndb
filesystem directory does not exist"
exit
1
exit
1
fi
fi
...
@@ -125,15 +119,13 @@ fi
...
@@ -125,15 +119,13 @@ fi
# set som help variables
# set som help variables
ndb_host
=
"localhost"
ndb_host
=
"localhost"
ndb_port
=
$port_base
"00"
ndb_mgmd_port
=
$port_base
NDB_CONNECTSTRING_BASE
=
"host=
$ndb_host
:
$ndb_port
;nodeid="
port_transporter
=
`
expr
$ndb_mgmd_port
+ 2
`
export
NDB_CONNECTSTRING
=
"host=
$ndb_host
:
$ndb_mgmd_port
"
# Start management server as deamon
# Start management server as deamon
NDB_ID
=
"1"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
# Edit file system path and ports in config file
# Edit file system path and ports in config file
if
[
$initial_ndb
]
;
then
if
[
$initial_ndb
]
;
then
...
@@ -143,59 +135,54 @@ sed \
...
@@ -143,59 +135,54 @@ sed \
-e
s,
"CHOOSE_IndexMemory"
,
$ndb_imem
,g
\
-e
s,
"CHOOSE_IndexMemory"
,
$ndb_imem
,g
\
-e
s,
"CHOOSE_Discless"
,
$ndb_discless
,g
\
-e
s,
"CHOOSE_Discless"
,
$ndb_discless
,g
\
-e
s,
"CHOOSE_HOSTNAME_"
.
*
,
"
$ndb_host
"
,g
\
-e
s,
"CHOOSE_HOSTNAME_"
.
*
,
"
$ndb_host
"
,g
\
-e
s,
"CHOOSE_FILESYSTEM_NODE_1"
,
"
$fs_name_1
"
,g
\
-e
s,
"CHOOSE_FILESYSTEM_NODE_2"
,
"
$fs_name_2
"
,g
\
-e
s,
"CHOOSE_FILESYSTEM_NODE_2"
,
"
$fs_name_2
"
,g
\
-e
s,
"CHOOSE_
FILESYSTEM_NODE_3"
,
"
$fs_name_3
"
,g
\
-e
s,
"CHOOSE_
PORT_MGM"
,
$ndb_mgmd_port
,g
\
-e
s,
"CHOOSE_PORT_
BASE"
,
$port_base
,g
\
-e
s,
"CHOOSE_PORT_
TRANSPORTER"
,
$port_transporter
,g
\
< ndb/ndb_config_2_node.ini
\
< ndb/ndb_config_2_node.ini
\
>
"
$fs_
mgm_1
/config.ini"
>
"
$fs_
ndb
/config.ini"
fi
fi
if
(
cd
$fs_mgm_1
;
echo
$NDB_CONNECTSTRING
>
$cfgfile
;
$exec_mgmtsrvr
-d
-c
config.ini
)
;
then
:
;
else
rm
-f
Ndb.cfg
rm
-f
$fs_ndb
/Ndb.cfg
if
(
cd
$fs_ndb
;
$exec_mgmtsrvr
-d
-c
config.ini
)
;
then
:
;
else
echo
"Unable to start
$exec_mgmtsrvr
from
`
pwd
`
"
echo
"Unable to start
$exec_mgmtsrvr
from
`
pwd
`
"
exit
1
exit
1
fi
fi
cat
`
find
$fs_ndb
-name
'n
ode
*.pid'
`
>
$pidfile
cat
`
find
$fs_ndb
-name
'n
db_
*.pid'
`
>
$pidfile
# Start database node
# Start database node
NDB_ID
=
"2"
echo
"Starting ndbd"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
(
cd
$fs_ndb
;
$exec_ndb
-d
$flags_ndb
&
)
echo
"Starting ndbd connectstring=
\"
"
$NDB_CONNECTSTRING
\"
(
cd
$fs_ndb_2
;
echo
$NDB_CONNECTSTRING
>
$cfgfile
;
$exec_ndb
-d
$flags_ndb
&
)
cat
`
find
$fs_ndb
-name
'n
ode
*.pid'
`
>
$pidfile
cat
`
find
$fs_ndb
-name
'n
db_
*.pid'
`
>
$pidfile
# Start database node
# Start database node
NDB_ID
=
"3"
echo
"Starting ndbd"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
(
cd
$fs_ndb
;
$exec_ndb
-d
$flags_ndb
&
)
echo
"Starting ndbd connectstring=
\"
"
$NDB_CONNECTSTRING
\"
(
cd
$fs_ndb_3
;
echo
$NDB_CONNECTSTRING
>
$cfgfile
;
$exec_ndb
-d
$flags_ndb
&
)
cat
`
find
$fs_ndb
-name
'n
ode
*.pid'
`
>
$pidfile
cat
`
find
$fs_ndb
-name
'n
db_
*.pid'
`
>
$pidfile
# test if Ndb Cluster starts properly
# test if Ndb Cluster starts properly
echo
"Waiting for started..."
echo
"Waiting for started..."
NDB_ID
=
"11"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
if
(
$exec_waiter
)
|
grep
"NDBT_ProgramExit: 0 - OK"
;
then
:
;
else
if
(
$exec_waiter
)
|
grep
"NDBT_ProgramExit: 0 - OK"
;
then
:
;
else
echo
"Ndbcluster startup failed"
echo
"Ndbcluster startup failed"
exit
1
exit
1
fi
fi
echo
$NDB_CONNECTSTRING
>
$cfgfile
cat
`
find
$fs_ndb
-name
'ndb_*.pid'
`
>
$pidfile
cat
`
find
$fs_ndb
-name
'node*.pid'
`
>
$pidfile
status_ndbcluster
status_ndbcluster
}
}
status_ndbcluster
()
{
status_ndbcluster
()
{
# Start management client
# Start management client
echo
"show"
|
$exec_mgmtclient
$ndb_host
$ndb_mgmd_port
echo
"show"
|
$exec_mgmtclient
$ndb_host
$ndb_port
}
}
stop_default_ndbcluster
()
{
stop_default_ndbcluster
()
{
...
@@ -210,11 +197,11 @@ if [ ! -f $cfgfile ] ; then
...
@@ -210,11 +197,11 @@ if [ ! -f $cfgfile ] ; then
fi
fi
ndb_host
=
`
cat
$cfgfile
|
sed
-e
"s,.*host=
\(
.*
\)\:
.*,
\1
,1"
`
ndb_host
=
`
cat
$cfgfile
|
sed
-e
"s,.*host=
\(
.*
\)\:
.*,
\1
,1"
`
ndb_port
=
`
cat
$cfgfile
|
sed
-e
"s,.*host=
$ndb_host
\:\(
[0-9]*
\)
.*,
\1
,1"
`
ndb_
mgmd_
port
=
`
cat
$cfgfile
|
sed
-e
"s,.*host=
$ndb_host
\:\(
[0-9]*
\)
.*,
\1
,1"
`
# Start management client
# Start management client
exec_mgmtclient
=
"
$exec_mgmtclient
--try-reconnect=1
$ndb_host
$ndb_port
"
exec_mgmtclient
=
"
$exec_mgmtclient
--try-reconnect=1
$ndb_host
$ndb_
mgmd_
port
"
echo
"
$exec_mgmtclient
"
echo
"
$exec_mgmtclient
"
echo
"all stop"
|
$exec_mgmtclient
echo
"all stop"
|
$exec_mgmtclient
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment