Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating from master-slave lingo #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
# The encoding of source files.
#source_encoding = 'utf-8'

# The master toctree document.
master_doc = 'index'
# The main toctree document.
main_doc = 'index'

# General information about the project.
project = u'nova'
Expand Down
22 changes: 11 additions & 11 deletions nova/contrib/boto/boto/emr/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ def add_jobflow_steps(self, jobflow_id, steps):
return self.get_object('AddJobFlowSteps', params, RunJobFlowResponse)

def run_jobflow(self, name, log_uri, ec2_keyname=None, availability_zone=None,
master_instance_type='m1.small',
slave_instance_type='m1.small', num_instances=1,
main_instance_type='m1.small',
subordinate_instance_type='m1.small', num_instances=1,
action_on_failure='TERMINATE_JOB_FLOW', keep_alive=False,
enable_debugging=False,
steps=[]):
Expand All @@ -145,10 +145,10 @@ def run_jobflow(self, name, log_uri, ec2_keyname=None, availability_zone=None,
:param ec2_keyname: EC2 key used for the instances
:type availability_zone: str
:param availability_zone: EC2 availability zone of the cluster
:type master_instance_type: str
:param master_instance_type: EC2 instance type of the master
:type slave_instance_type: str
:param slave_instance_type: EC2 instance type of the slave nodes
:type main_instance_type: str
:param main_instance_type: EC2 instance type of the main
:type subordinate_instance_type: str
:param subordinate_instance_type: EC2 instance type of the subordinate nodes
:type num_instances: int
:param num_instances: Number of instances in the Hadoop cluster
:type action_on_failure: str
Expand All @@ -171,7 +171,7 @@ def run_jobflow(self, name, log_uri, ec2_keyname=None, availability_zone=None,

# Instance args
instance_params = self._build_instance_args(ec2_keyname, availability_zone,
master_instance_type, slave_instance_type,
main_instance_type, subordinate_instance_type,
num_instances, keep_alive)
params.update(instance_params)

Expand Down Expand Up @@ -218,11 +218,11 @@ def _build_step_list(self, steps):
params['Steps.memeber.%s.%s' % (i+1, key)] = value
return params

def _build_instance_args(self, ec2_keyname, availability_zone, master_instance_type,
slave_instance_type, num_instances, keep_alive):
def _build_instance_args(self, ec2_keyname, availability_zone, main_instance_type,
subordinate_instance_type, num_instances, keep_alive):
params = {
'Instances.MasterInstanceType' : master_instance_type,
'Instances.SlaveInstanceType' : slave_instance_type,
'Instances.MainInstanceType' : main_instance_type,
'Instances.SubordinateInstanceType' : subordinate_instance_type,
'Instances.InstanceCount' : num_instances,
'Instances.KeepJobFlowAliveWhenNoSteps' : str(keep_alive).lower()
}
Expand Down
24 changes: 12 additions & 12 deletions nova/contrib/boto/boto/rds/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_all_dbinstances(self, instance_id=None, max_records=None,
return self.get_list('DescribeDBInstances', params, [('DBInstance', DBInstance)])

def create_dbinstance(self, id, allocated_storage, instance_class,
master_username, master_password, port=3306,
main_username, main_password, port=3306,
engine='MySQL5.1', db_name=None, param_group=None,
security_groups=None, availability_zone=None,
preferred_maintenance_window=None,
Expand Down Expand Up @@ -108,13 +108,13 @@ def create_dbinstance(self, id, allocated_storage, instance_class,
:type engine: str
:param engine: Name of database engine. Must be MySQL5.1 for now.

:type master_username: str
:param master_username: Name of master user for the DBInstance.
:type main_username: str
:param main_username: Name of main user for the DBInstance.
Must be 1-15 alphanumeric characters, first must be
a letter.

:type master_password: str
:param master_password: Password of master user for the DBInstance.
:type main_password: str
:param main_password: Password of main user for the DBInstance.
Must be 4-16 alphanumeric characters.

:type port: int
Expand Down Expand Up @@ -161,8 +161,8 @@ def create_dbinstance(self, id, allocated_storage, instance_class,
'AllocatedStorage' : allocated_storage,
'DBInstanceClass' : instance_class,
'Engine' : engine,
'MasterUsername' : master_username,
'MasterUserPassword' : master_password}
'MainUsername' : main_username,
'MainUserPassword' : main_password}
if port:
params['Port'] = port
if db_name:
Expand Down Expand Up @@ -190,7 +190,7 @@ def create_dbinstance(self, id, allocated_storage, instance_class,

def modify_dbinstance(self, id, param_group=None, security_groups=None,
preferred_maintenance_window=None,
master_password=None, allocated_storage=None,
main_password=None, allocated_storage=None,
instance_class=None,
backup_retention_period=None,
preferred_backup_window=None,
Expand All @@ -210,8 +210,8 @@ def modify_dbinstance(self, id, param_group=None, security_groups=None,
which maintenance can occur.
Default is Sun:05:00-Sun:09:00

:type master_password: str
:param master_password: Password of master user for the DBInstance.
:type main_password: str
:param main_password: Password of main user for the DBInstance.
Must be 4-15 alphanumeric characters.

:type allocated_storage: int
Expand Down Expand Up @@ -258,8 +258,8 @@ def modify_dbinstance(self, id, param_group=None, security_groups=None,
self.build_list_params(params, l, 'DBSecurityGroups.member')
if preferred_maintenance_window:
params['PreferredMaintenanceWindow'] = preferred_maintenance_window
if master_password:
params['MasterUserPassword'] = master_password
if main_password:
params['MainUserPassword'] = main_password
if allocated_storage:
params['AllocatedStorage'] = allocated_storage
if instance_class:
Expand Down
6 changes: 3 additions & 3 deletions nova/contrib/boto/boto/rds/dbinstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, connection=None, id=None):
self.allocated_storage = None
self.endpoint = None
self.instance_class = None
self.master_username = None
self.main_username = None
self.parameter_group = None
self.security_group = None
self.availability_zone = None
Expand Down Expand Up @@ -77,8 +77,8 @@ def endElement(self, name, value, connection):
self.allocated_storage = int(value)
elif name == 'DBInstanceClass':
self.instance_class = value
elif name == 'MasterUsername':
self.master_username = value
elif name == 'MainUsername':
self.main_username = value
elif name == 'Port':
if self._in_endpoint:
self._port = int(value)
Expand Down
6 changes: 3 additions & 3 deletions nova/contrib/boto/boto/rds/dbsnapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, connection=None, id=None):
self.port = None
self.status = None
self.availability_zone = None
self.master_username = None
self.main_username = None
self.allocated_storage = None
self.instance_id = None
self.availability_zone = None
Expand Down Expand Up @@ -61,8 +61,8 @@ def endElement(self, name, value, connection):
self.status = value
elif name == 'AvailabilityZone':
self.availability_zone = value
elif name == 'MasterUsername':
self.master_username = value
elif name == 'MainUsername':
self.main_username = value
elif name == 'AllocatedStorage':
self.allocated_storage = int(value)
elif name == 'SnapshotTime':
Expand Down
2 changes: 1 addition & 1 deletion nova/contrib/boto/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo']
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
main_doc = 'index'
project = u'boto'
copyright = u'2009,2010, Mitch Garnaat'
version = '1.9'
Expand Down
4 changes: 2 additions & 2 deletions nova/contrib/lockfile/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
# The suffix of source filenames.
source_suffix = '.rst'

# The master toctree document.
master_doc = 'lockfile'
# The main toctree document.
main_doc = 'lockfile'

# General substitutions.
project = 'lockfile'
Expand Down
8 changes: 4 additions & 4 deletions nova/contrib/tornado/website/markdown/blockprocessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def run(self, parent, blocks):
code.text = markdown.AtomicString('%s\n' % block.rstrip())
if theRest:
# This block contained unindented line(s) after the first indented
# line. Insert these lines as the first block of the master blocks
# line. Insert these lines as the first block of the main blocks
# list for future processing.
blocks.insert(0, theRest)

Expand Down Expand Up @@ -377,7 +377,7 @@ def run(self, parent, blocks):
h = markdown.etree.SubElement(parent, 'h%d' % level)
h.text = lines[0].strip()
if len(lines) > 2:
# Block contains additional lines. Add to master blocks for later.
# Block contains additional lines. Add to main blocks for later.
blocks.insert(0, '\n'.join(lines[2:]))


Expand Down Expand Up @@ -411,7 +411,7 @@ def run(self, parent, blocks):
# check for lines in block after hr.
lines = lines[len(prelines)+1:]
if len(lines):
# Add lines after hr to master blocks for later parsing.
# Add lines after hr to main blocks for later parsing.
blocks.insert(0, '\n'.join(lines))


Expand All @@ -429,7 +429,7 @@ def run(self, parent, blocks):
block = blocks.pop(0)
m = self.RE.match(block)
if m:
# Add remaining line to master blocks for later.
# Add remaining line to main blocks for later.
blocks.insert(0, block[m.end():])
sibling = self.lastChild(parent)
if sibling and sibling.tag == 'pre' and sibling[0] and \
Expand Down