forward3d/rbhive

View on GitHub

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
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb - About 1 wk to fix

    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
    Severity: Major
    Found in lib/thrift/t_c_l_i_service_types.rb - About 3 days to fix

      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)
      Severity: Major
      Found in lib/thrift/thrift_hive_metastore.rb - About 3 days to fix

        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
        Severity: Major
        Found in lib/thrift/t_c_l_i_service.rb - About 1 day to fix

          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)
          Severity: Major
          Found in lib/thrift/thrift_hive_metastore.rb - About 1 day to fix

            Class Client has 57 methods (exceeds 20 allowed). Consider refactoring.
            Open

                  class Client
                    include ::Thrift::Client
            
                    def OpenSession(req)
                      send_OpenSession(req)
            Severity: Major
            Found in lib/thrift/t_c_l_i_service.rb - About 1 day to fix

              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
              Severity: Minor
              Found in lib/thrift/facebook_service.rb - About 7 hrs to fix

                File hive_metastore_types.rb has 481 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                require 'thrift'
                require_relative 'fb303_types'
                
                
                module HiveObjectType
                Severity: Minor
                Found in lib/thrift/hive_metastore_types.rb - About 7 hrs to fix

                  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
                  Severity: Minor
                  Found in lib/rbhive/t_c_l_i_connection.rb - About 5 hrs to fix

                    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
                    Severity: Minor
                    Found in lib/thrift/thrift_hive.rb - About 5 hrs to fix

                      Class Client has 37 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                        class Client
                          include ::Thrift::Client
                      
                          def getName()
                            send_getName()
                      Severity: Minor
                      Found in lib/thrift/facebook_service.rb - About 4 hrs to fix

                        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)
                        
                        
                        Severity: Minor
                        Found in lib/rbhive/t_c_l_i_connection.rb - About 4 hrs to fix

                          Class Client has 24 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                                class Client < ::ThriftHiveMetastore::Client 
                                  include ::Thrift::Client
                          
                                  def execute(query)
                                    send_execute(query)
                          Severity: Minor
                          Found in lib/thrift/thrift_hive.rb - About 2 hrs to fix

                            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
                            Severity: Major
                            Found in lib/rbhive/t_c_l_i_schema_definition.rb and 1 other location - About 2 hrs to fix
                            lib/rbhive/schema_definition.rb on lines 25..48

                            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

                            Further Reading

                            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
                            Severity: Major
                            Found in lib/rbhive/schema_definition.rb and 1 other location - About 2 hrs to fix
                            lib/rbhive/t_c_l_i_schema_definition.rb on lines 25..48

                            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

                            Further Reading

                            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)
                            Severity: Minor
                            Found in lib/rbhive/connection.rb - About 2 hrs to fix

                              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
                              Severity: Major
                              Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 1 hr to fix
                              lib/thrift/thrift_hive_metastore.rb on lines 2095..2114

                              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

                              Further Reading

                              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
                              Severity: Major
                              Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 1 hr to fix
                              lib/thrift/thrift_hive_metastore.rb on lines 2055..2074

                              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

                              Further Reading

                              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
                              Severity: Major
                              Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 1 hr to fix
                              lib/thrift/thrift_hive_metastore.rb on lines 2877..2896

                              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

                              Further Reading

                              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
                              Severity: Major
                              Found in lib/thrift/thrift_hive_metastore.rb and 4 other locations - About 1 hr to fix
                              lib/thrift/thrift_hive_metastore.rb on lines 2355..2374
                              lib/thrift/thrift_hive_metastore.rb on lines 2397..2416
                              lib/thrift/thrift_hive_metastore.rb on lines 2439..2458
                              lib/thrift/thrift_hive_metastore.rb on lines 3119..3138

                              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

                              Further Reading

                              Severity
                              Category
                              Status
                              Source
                              Language