Showing 65 of 414 total issues
File thrift_hive_metastore.rb
has 3042 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'thrift'
require_relative 'facebook_service'
require_relative 'hive_metastore_types'
module ThriftHiveMetastore
File t_c_l_i_service_types.rb
has 1349 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'thrift'
module Hive2
module Thrift
module TProtocolVersion
Class Client
has 171 methods (exceeds 20 allowed). Consider refactoring. Open
class Client < ::FacebookService::Client
include ::Thrift::Client
def create_database(database)
send_create_database(database)
File t_c_l_i_service.rb
has 774 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'thrift'
require_relative 't_c_l_i_service_types'
module Hive2
module Thrift
Class Processor
has 57 methods (exceeds 20 allowed). Consider refactoring. Open
class Processor < ::FacebookService::Processor
include ::Thrift::Processor
def process_create_database(seqid, iprot, oprot)
args = read_args(iprot, Create_database_args)
Class Client
has 57 methods (exceeds 20 allowed). Consider refactoring. Open
class Client
include ::Thrift::Client
def OpenSession(req)
send_OpenSession(req)
File facebook_service.rb
has 496 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'thrift'
require_relative 'fb303_types'
module FacebookService
class Client
File hive_metastore_types.rb
has 481 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'thrift'
require_relative 'fb303_types'
module HiveObjectType
Class TCLIConnection
has 43 methods (exceeds 20 allowed). Consider refactoring. Open
class TCLIConnection
attr_reader :client
def initialize(server, port = 10_000, options = {}, logger = StdOutLogger.new)
options ||= {} # backwards compatibility
File thrift_hive.rb
has 376 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'thrift'
require_relative 'thrift_hive_metastore'
require_relative 'hive_service_types'
module Hive
Class Client
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
class Client
include ::Thrift::Client
def getName()
send_getName()
File t_c_l_i_connection.rb
has 334 lines of code (exceeds 250 allowed). Consider refactoring. Open
old_verbose, $VERBOSE = $VERBOSE, nil
raise 'Thrift is not loaded' unless defined?(Thrift)
raise 'RBHive is not loaded' unless defined?(RBHive)
Class Client
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class Client < ::ThriftHiveMetastore::Client
include ::Thrift::Client
def execute(query)
send_execute(query)
Class Connection
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class Connection
attr_reader :client
def initialize(server, port=10_000, logger=StdOutLogger.new)
@socket = Thrift::Socket.new(server, port)
Method validate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def validate
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationHandle is unset!') unless @operationHandle
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field orientation is unset!') unless @orientation
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxRows is unset!') unless @maxRows
unless @orientation.nil? || ::Hive2::Thrift::TFetchOrientation::VALID_VALUES.include?(@orientation)
- Read upRead up
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 validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def validate
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationId is unset!') unless @operationId
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationType is unset!') unless @operationType
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hasResultSet is unset!') if @hasResultSet.nil?
unless @operationType.nil? || ::Hive2::Thrift::TOperationType::VALID_VALUES.include?(@operationType)
- Read upRead up
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 recv_append_partition
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def recv_append_partition()
result = receive_message(Append_partition_result)
return result.success unless result.success.nil?
raise result.o1 unless result.o1.nil?
raise result.o2 unless result.o2.nil?
- Read upRead up
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 recv_add_partition
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def recv_add_partition()
result = receive_message(Add_partition_result)
return result.success unless result.success.nil?
raise result.o1 unless result.o1.nil?
raise result.o2 unless result.o2.nil?
- Read upRead up
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 recv_add_index
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def recv_add_index()
result = receive_message(Add_index_result)
return result.success unless result.success.nil?
raise result.o1 unless result.o1.nil?
raise result.o2 unless result.o2.nil?
- Read upRead up
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 recv_create_table
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def recv_create_table()
result = receive_message(Create_table_result)
raise result.o1 unless result.o1.nil?
raise result.o2 unless result.o2.nil?
raise result.o3 unless result.o3.nil?
- Read upRead up
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"