Showing 19 of 509 total issues
Method create_proposal
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def create_proposal
@logger.debug("hadoop_infrastructure create_proposal: entering")
base = super
adminnodes = [] # Crowbar admin node (size=1).
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method create_proposal
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
def create_proposal
@logger.debug("hadoop create_proposal: entering")
base = super
# Compute the hadoop cluster node distribution.
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method create_proposal
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_proposal
@logger.debug("hadoop_infrastructure create_proposal: entering")
base = super
adminnodes = [] # Crowbar admin node (size=1).
- Create a ticketCreate a ticket
Method create_proposal
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_proposal
@logger.debug("hadoop create_proposal: entering")
base = super
# Compute the hadoop cluster node distribution.
- Create a ticketCreate a ticket
Method create_proposal
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def create_proposal
@logger.debug("zookeeper create_proposal: entering")
base = super
# Get the node list.
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method nodes
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def nodes
@hadoop_config = @service_object.get_hadoop_config
respond_to do |format|
format.html { render template: "barclamp/hadoop_infrastructure/nodes" }
- Create a ticketCreate a ticket
Method create_proposal
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def create_proposal
@logger.debug("hive create_proposal: entering")
base = super
# Get the node list.
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method create_proposal
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def create_proposal
@logger.debug("pig create_proposal: entering")
base = super
# Get the node list.
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method apply_role_pre_chef_call
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def apply_role_pre_chef_call(old_role, role, all_nodes)
@logger.debug("hadoop apply_role_pre_chef_call: entering #{all_nodes.inspect}")
return if all_nodes.empty?
# Make sure that the front-end pieces have public ip addreses.
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method create_proposal
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def create_proposal
@logger.debug("sqoop create_proposal: entering")
base = super
# Get the node list.
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method apply_role_pre_chef_call
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def apply_role_pre_chef_call(old_role, role, all_nodes)
@logger.debug("hadoop_infrastructure apply_role_pre_chef_call: entering #{all_nodes.inspect}")
return if all_nodes.empty?
# Assign a public IP address to the edge node for external access.
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid deeply nested control flow statements. Open
slaves << n[:fqdn] if n[:fqdn]
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
slaves << nodes[1][:fqdn] if nodes[1][:fqdn]
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
edge << nodes[2][:fqdn] if nodes[2][:fqdn]
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
namenodes << nodes[1][:fqdn] if nodes[1][:fqdn]
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
namenodes << nodes[0][:fqdn] if nodes[0][:fqdn]
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
master << nodes[0][:fqdn] if nodes[0][:fqdn]
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
edgenodes << nodes[2][:fqdn] if nodes[2][:fqdn]
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
datanodes << n[:fqdn] if n[:fqdn]
- Create a ticketCreate a ticket