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
11bd3eed
Commit
11bd3eed
authored
Jun 28, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated mysql-test/ndb to make use of new default config options
parent
f0ccb88e
Changes
2
Show 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 @
11bd3eed
...
...
@@ -7,71 +7,30 @@ Discless: CHOOSE_Discless
[COMPUTER]
Id:
1
ByteOrder:
Little
HostName:
CHOOSE_HOSTNAME_1
[COMPUTER]
Id:
2
ByteOrder:
Little
HostName:
CHOOSE_HOSTNAME_2
[COMPUTER]
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
[DB]
ExecuteOnComputer:
1
PortNumber:
CHOOSE_PORT_BASE00
PortNumberStats:
CHOOSE_PORT_BASE01
FileSystemPath:
CHOOSE_FILESYSTEM_NODE_1
[DB]
Id:
2
ExecuteOnComputer:
2
FileSystemPath:
CHOOSE_FILESYSTEM_NODE_2
[DB]
Id:
3
ExecuteOnComputer:
3
FileSystemPath:
CHOOSE_FILESYSTEM_NODE_3
[MGM]
PortNumber:
CHOOSE_PORT_MGM
[API]
Id:
11
ExecuteOnComputer:
4
[API]
Id:
12
ExecuteOnComputer:
5
[API]
Id:
13
ExecuteOnComputer:
6
[API]
Id:
14
ExecuteOnComputer:
7
[TCP DEFAULT]
PortNumber:
CHOOSE_PORT_
BASE02
PortNumber:
CHOOSE_PORT_
TRANSPORTER
mysql-test/ndb/ndbcluster.sh
View file @
11bd3eed
...
...
@@ -5,7 +5,7 @@
# This scripts starts the table handler ndbcluster
# 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
`
# end configurable parameters
...
...
@@ -82,11 +82,8 @@ while test $# -gt 0; do
done
fs_ndb
=
$fsdir
/ndbcluster
fs_mgm_1
=
$fs_ndb
/1.ndb_mgm
fs_ndb_2
=
$fs_ndb
/2.ndb_db
fs_ndb_3
=
$fs_ndb
/3.ndb_db
fs_name_2
=
$fs_ndb
/node-2-fs
fs_name_3
=
$fs_ndb
/node-3-fs
fs_name_1
=
$fs_ndb
/node-1-fs-
$port_base
fs_name_2
=
$fs_ndb
/node-2-fs-
$port_base
NDB_HOME
=
export
NDB_CONNECTSTRING
...
...
@@ -111,13 +108,10 @@ NDB_CONNECTSTRING=
if
[
$initial_ndb
]
;
then
[
-d
$fs_ndb
]
||
mkdir
$fs_ndb
[
-d
$fs_mgm_1
]
||
mkdir
$fs_mgm_1
[
-d
$fs_ndb_2
]
||
mkdir
$fs_ndb_2
[
-d
$fs_ndb_3
]
||
mkdir
$fs_ndb_3
[
-d
$fs_name_1
]
||
mkdir
$fs_name_1
[
-d
$fs_name_2
]
||
mkdir
$fs_name_2
[
-d
$fs_name_3
]
||
mkdir
$fs_name_3
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"
exit
1
fi
...
...
@@ -125,15 +119,13 @@ fi
# set som help variables
ndb_host
=
"localhost"
ndb_port
=
$port_base
"00"
NDB_CONNECTSTRING_BASE
=
"host=
$ndb_host
:
$ndb_port
;nodeid="
ndb_mgmd_port
=
$port_base
port_transporter
=
`
expr
$ndb_mgmd_port
+ 2
`
export
NDB_CONNECTSTRING
=
"host=
$ndb_host
:
$ndb_mgmd_port
"
# Start management server as deamon
NDB_ID
=
"1"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
# Edit file system path and ports in config file
if
[
$initial_ndb
]
;
then
...
...
@@ -143,59 +135,54 @@ sed \
-e
s,
"CHOOSE_IndexMemory"
,
$ndb_imem
,g
\
-e
s,
"CHOOSE_Discless"
,
$ndb_discless
,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_3"
,
"
$fs_name_3
"
,g
\
-e
s,
"CHOOSE_PORT_
BASE"
,
$port_base
,g
\
-e
s,
"CHOOSE_
PORT_MGM"
,
$ndb_mgmd_port
,g
\
-e
s,
"CHOOSE_PORT_
TRANSPORTER"
,
$port_transporter
,g
\
< ndb/ndb_config_2_node.ini
\
>
"
$fs_
mgm_1
/config.ini"
>
"
$fs_
ndb
/config.ini"
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
`
"
exit
1
fi
cat
`
find
$fs_ndb
-name
'n
ode
*.pid'
`
>
$pidfile
cat
`
find
$fs_ndb
-name
'n
db_
*.pid'
`
>
$pidfile
# Start database node
NDB_ID
=
"2"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
echo
"Starting ndbd connectstring=
\"
"
$NDB_CONNECTSTRING
\"
(
cd
$fs_ndb_2
;
echo
$NDB_CONNECTSTRING
>
$cfgfile
;
$exec_ndb
-d
$flags_ndb
&
)
echo
"Starting ndbd"
(
cd
$fs_ndb
;
$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
NDB_ID
=
"3"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
echo
"Starting ndbd connectstring=
\"
"
$NDB_CONNECTSTRING
\"
(
cd
$fs_ndb_3
;
echo
$NDB_CONNECTSTRING
>
$cfgfile
;
$exec_ndb
-d
$flags_ndb
&
)
echo
"Starting ndbd"
(
cd
$fs_ndb
;
$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
echo
"Waiting for started..."
NDB_ID
=
"11"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
if
(
$exec_waiter
)
|
grep
"NDBT_ProgramExit: 0 - OK"
;
then
:
;
else
echo
"Ndbcluster startup failed"
exit
1
fi
echo
$NDB_CONNECTSTRING
>
$cfgfile
cat
`
find
$fs_ndb
-name
'node*.pid'
`
>
$pidfile
cat
`
find
$fs_ndb
-name
'ndb_*.pid'
`
>
$pidfile
status_ndbcluster
}
status_ndbcluster
()
{
# Start management client
echo
"show"
|
$exec_mgmtclient
$ndb_host
$ndb_port
# Start management client
echo
"show"
|
$exec_mgmtclient
$ndb_host
$ndb_mgmd_port
}
stop_default_ndbcluster
()
{
...
...
@@ -210,11 +197,11 @@ if [ ! -f $cfgfile ] ; then
fi
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
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
"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