Skip to content

Conversation

boazmohar
Copy link
Contributor

Alternative implementation to #279
Thinking of adding a flag to fromtif() that would default to the current behavior of rising an error.
Also I am sending the warning using the warning module, I saw another way using the spark logger:

log4jLogger = sc._jvm.org.apache.log4j
LOGGER = log4jLogger.LogManager.getLogger(__name__)
LOGGER.warning("number of planes...")

@sofroniewn @freeman-lab What do you guys think?

@freeman-lab
Copy link
Member

Why don't we forget the warning stuff, because doing warnings on the workers well is hard, and instead add a keyword argument like discard_extra that will discard extra planes instead of giving an error (as we do now). Ok if you want at the same time to use our own warnings to log the file name.

@freeman-lab
Copy link
Member

Warnings should be done like this:

logging.getLogger('thunder').warn("Operation not supported in '%s' mode" % mode)

@boazmohar
Copy link
Contributor Author

@freeman-lab Thanks for the comments!
I think it is ready to merge.

@freeman-lab
Copy link
Member

Excellent, looks good to me @boazmohar , merging in!

@freeman-lab freeman-lab merged commit dd7ed83 into thunder-project:master May 26, 2016
@boazmohar boazmohar deleted the readTiffPage branch May 26, 2016 23:58
@boazmohar boazmohar mentioned this pull request Jun 7, 2016
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.

2 participants