Skip to content

GORA-439 Remove Unused Method Parameters#43

Closed
kamaci wants to merge 1 commit intoapache:masterfrom
kamaci:master
Closed

GORA-439 Remove Unused Method Parameters#43
kamaci wants to merge 1 commit intoapache:masterfrom
kamaci:master

Conversation

@kamaci
Copy link
Member

@kamaci kamaci commented Sep 10, 2015

Unused method parameters are removed and API signatures made clean.

@lewismc
Copy link
Member

lewismc commented Oct 3, 2015

Hi @kamaci I had a look through the patch. Please make sure that there are no regressions. I am +1 to commit if this is the case.

@renato2099
Copy link
Contributor

I am in favour of this, but yeah we might discuss about the API some more to see whether it makes sense to keep what. I mean right now, if those parameters are not being used, sure maybe we can take them out, but I think we should look into why they were put there e.g. passing the dataStore object into the GoraMapper, is this because we can get it through the Query object? I think most of the others are a lot more straight forward.

@kamaci
Copy link
Member Author

kamaci commented Oct 5, 2015

Unused method parameters may lead a potential bug. Here is a list of what I've changed:

  • CassandraSuperColumn.java#getUnionIndex(String fieldName, HColumn<ByteBuffer, ByteBuffer> uc)
  • QueryCounter.java#createJob(DataStore<K,T> dataStore, Query<K,T> query)
  • QueryCounter.java#countQuery(DataStore<K,T> dataStore, Query<K,T> query)
  • WordCount.java#createJob(DataStore<String,WebPage> inStore, Query<String,WebPage> query, DataStore<String,TokenDatum> outStore)
  • GoraInputFormat.java#setInputPath(PartitionQuery<K,T> partitionQuery, TaskAttemptContext context)
  • GoraInputFormat.java#setInput(Job job, Query<K1,V1> query, DataStore<K1,V1> dataStore, boolean reuseObjects)
  • GoraMapper.java#initMapperJob(Job job, Query<K1,V1> query, DataStore<K1,V1> dataStore, Class outKeyClass, Class outKeyClass, Class outValueClass, Class<? extends GoraMapper> mapperClass, Class<? extends Partitioner> partitionerClass, boolean reuseObjects)
  • GoraMapper.java#initMapperJob(Job job, Query<K1,V1> query, DataStore<K1,V1> dataStore, Class outKeyClass, Class outKeyClass, Class outValueClass, Class<? extends GoraMapper> mapperClass, boolean reuseObjects)
  • IOUtils.java#serialize(OutputStream os, SpecificDatumWriter datumWriter, Schema schema, T object)
  • IOUtils.java#serialize(SpecificDatumWriter datumWriter, Schema schema, T object)
  • IOUtils.java#deserialize(InputStream is, SpecificDatumReader datumReader, Schema schema, T object)
  • IOUtils.java#deserialize(byte[] bytes, SpecificDatumReader datumReader, Schema schema, T object)
  • DataStoreTestUtil.java#createEmployee(DataStore<K, Employee> dataStore)
  • DataStoreTestUtil.java#createWebPage(DataStore<K, Employee> dataStore)
  • DataStoreTestUtil.java#createBoss(DataStore<K, Employee> dataStore)
  • MongoMapping.java#addClassField(String docNameFromMapping, String classFieldName, String docFieldName, String fieldType)

@renato2099
Copy link
Contributor

Hey @kamaci I think I will try to respond to myself lol I think it is fine because the query object gets created by the dataStore, thus it will already contain a reference to it when passed into the MapReduce job. So I am a +1 after looking it more carefully

@asfgit asfgit closed this in b5ba30c Oct 29, 2015
@lewismc
Copy link
Member

lewismc commented May 19, 2016

This has been merged right?

@kamaci
Copy link
Member Author

kamaci commented May 19, 2016

I thought something is wrong but it is completely OK, no problem. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants