Showing 414 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)
Similar blocks of code found in 2 locations. Consider refactoring. Open
def column_names
@column_names ||= begin
schema_names = @schema.columns.map {|c| c.columnName }
# In rare cases Hive can return two identical column names
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 84.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
def column_names
@column_names ||= begin
schema_names = @schema.fieldSchemas.map {|c| c.name }
# In rare cases Hive can return two identical column names
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 84.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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)
Similar blocks of code found in 2 locations. Consider refactoring. Open
class Get_fields_result
include ::Thrift::Struct, ::Thrift::Struct_Union
SUCCESS = 0
O1 = 1
O2 = 2
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 72.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
class Get_schema_result
include ::Thrift::Struct, ::Thrift::Struct_Union
SUCCESS = 0
O1 = 1
O2 = 2
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 72.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
class Get_partitions_ps_args
include ::Thrift::Struct, ::Thrift::Struct_Union
DB_NAME = 1
TBL_NAME = 2
PART_VALS = 3
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 66.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 5 locations. Consider refactoring. Open
class Create_table_result
include ::Thrift::Struct, ::Thrift::Struct_Union
O1 = 1
O2 = 2
O3 = 3
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 66.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76